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?
In the html element.
What is the purpose of a <!DOCTYPE> declaration?
It tells the browser what version of HTML the document is written in.
Give five examples of HTML element types.
Head, body, div, article, nav.
What is the purpose of HTML attributes?
Attributes provide additional information about elements.
Give an example of an HTML entity (escape character).
© (copyright symbol)
How do block-level elements affect the document flow?
A block-level element occupies the entire horizontal space (100%) of its parent element (container), and vertical space equal to the height of its contents, thereby creating a “block”. (Breaks the flow of content).
How do inline elements affect the document flow?
Inline elements are those which only occupy the space 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?
Width is 100% of the parent element, and height is determined by the inner content (auto).
What are the default width and height of an inline element?
Width and height are determined based on the inner content (both are auto).
What is the difference between an ordered list and an unordered list in HTML?
An ordered list is listed in numerical order by default, and and unordered list is listed with bullet points as default.
Is an HTML list a block element or an inline element?
Lists are block-level elements.
What HTML tag is used to link to another website?
Anchor tags.
What is an absolute URL?
An anchor tag that links to an external webpage.