HTML Flashcards
Where do you put non-visible content about the HTML document?
In the head element
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?
Head element goes at the top of the document, under the HTML opening tag and any metadata describing this document; body element goes underneath the closing tag for the head element and before the closing HTML tag
What is the purpose of a !DOCTYPE declaration?
tells the browser which version of HTML the page is using
Give five examples of HTML element tags.
h1, p, img, span, div
What is the purpose of HTML attributes?
They provide additional info about the contents of the element
Give an example of an HTML entity (escape character).
×
&
©
®
How do block-level elements affect the document flow?
They take up the width of their parent element and the height of its contents; they start on a new line and can be visualized like boxes stacking on top of each other; any elements that follow go to a new line
How do inline elements affect the document flow?
Rather than breaking the flow of the document, it takes up only the space bounded by the tags defining the element; an element following an inline element would go right after it if possible
What are the default width and height of a block-level element?
The default width is 100% of the width of the parent element and the default height is the height of its contents (auto) that the block-level element contains
What are the default width and height of an inline element?
It only takes up as much width as necessary; space bounded by the tags defining the element
What is the difference between an ordered list and an unordered list in HTML?
Ordered lists: are ordered; for series of data with some sort of set data; you can change the way they’re ordered in styling
Unordered lists: bullet-point lists, no specific order
Is an HTML list a block element or an inline element?
Block element
list items are also block
What HTML tag is used to link to another website?
anchor tag with href attribute
What is an absolute URL?
links us to another website; starts with a domain name for the site and can be followed by the path to a specific page; starts with http or https