HTML Flashcards
Where do you put non-visible content about the HTML document?
In the head element of the HTML document.
Where do you put visible content about the HTML document?
In the body element of the HTML document.
Where do the head and body tags go in a valid HTML document?
In the html element of the HTML document.
What is the purpose of a doctype declaration?
The doctype declaration tells the browser which version of HTML the document is written in.
(!doctype html tells the browser that the document is written in HTML5)
Give five examples of HTML element types.
html, head, title, body, and h1-h6.
(p, span, a, ol, ul, li, em, strong, del, ins, etc.)
What is the purpose of HTML attributes?
The purpose of HTML attributes is to provide additional information about HTML elements.
(Color, size, and other features)
Give an example of an HTML entity (escape character).
Ampersand, copyright, and registered trademark are a few examples of HTML entities.
How do block-level elements affect the document flow?
Block-level elements force a new line to begin in the document flow.
How do inline elements affect the document flow?
Inline elements do not force a new line to begin in the document flow.
What are the default width and height of a block-level element?
The default width of a block-level element is the width of its parent element.
The default height of a block-level element is the height of its contents.
What are the default width and height of an inline element?
The default width of an inline element is the width of its contents.
The default height of an inline element is the height of its contents.
What is the difference between an ordered list and an unordered list in HTML?
Ordered lists create a list of related items in a specific order using numerical values.
Unordered lists create a list of related items in no particular order using bullets.
Is an HTML list a block element or an inline element?
An HTML list is a block element because each list item starts on a new line.
What HTML tag is used to link to another website?
The HTML tag used to link to another website is the a (or anchor) tag.
What is an absolute URL?
An absolute URL contains a domain name which points the user to a file on a different website.