HTML Flashcards
HTML flashcards
Where do you put non-visible content about the HTML document?
In the head element.
Note: the title element within the head element will be visible at the top of the browser or in the browser tab.
Where do you put visible content about the HTML document?
In the body element.
Where do the head and body tags go in a valid HTML document?
In the html element located beneath the doctype declaration.
What is the purpose of a !DOCTYPE declaration?
Ensures that the browser renders the document as HTML and follows HTML specifications.
Give five examples of HTML element tags.
- body
- head
- title
- line break: br
- span
- extra- - horizontal rule: hr
- anchor: a (with href attribute and file path)
- p
- div
What is the purpose of HTML attributes?
To provide more information about the contents of the associated element. It is comprised of an attribute name and a corresponding value.
Give an example of an HTML entity (escape character).
Ampersand: (ampersand symbol)amp;
-extra-
Trademark: (ampersand symbol)trade;
Note: All end with semicolon.
How do block-level elements affect the document flow?
Breaks the document flow and creates line breaks between neighboring elements, starts on a new line.
Note: They take up the entire horizontal space of its parent element, and the vertical space needed for its contents.
How do inline elements affect the document flow?
The elements will appear to continue on the same line as neighboring elements. Note: Takes up the least amount of space available bounded by the tags defining the element, instead of breaking the flow of the content.
What are the default width and height of a block-level element?
All of the horizontal space available within its parent element (container), and the vertical space needed for the height of its contents.
What are the default width and height of an inline element?
An inline element does not start on a new line and only takes up as much width and height as necessary, bounded by the tags defining the element.
What is the difference between an ordered list and an unordered list in HTML?
Ordered lists are numbered or in sequence (A-Z) and unordered lists are not numbered and use bullet points
Is an HTML list a block element or an inline element?
The list and list items are both block-level elements.
What HTML tag is used to link to another website?
Anchor tag with an href attribute.
What is an absolute URL?
An absolute URL starts with the domain name for that site and can be followed by the path to a specific page. Used for external website links.