HTML Flashcards
Where do you put non-visible content about the HTML document?
In the head element. Usually the metadata, script tag, stylesheet, and title.
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?
They go in between the HTML element.
What is the purpose of a !DOCTYPE declaration?
It tells the web browser what version of HTML to use.
Give five examples of HTML element types.
P, head, body, div, and h1
What is the purpose of HTML attributes?
To customize HTML elements.
Give an example of an HTML entity (escape character).
Two examples are the copyright (©) and registered (®) signs. HTML entities are written with the ampersand(&) and some text.
How do block-level elements affect the document flow?
Each block level element appears on a new line. They are laid out vertically and take the full width of the page. Their vertical distance from other elements is determined by margins.
How do inline elements affect the document flow?
Inline elements only take the space they need in their parent element. They don’t appear on new lines.
What are the default width and height of a block-level element?
Default width: full-length of the page or value of “auto”
Default height: height of the text content
What are the default width and height of an inline element?
Default width: the width of the text content
Default height: the height of the text content
You can’t set the height and width of an inline element. You’d have to make them a block or inline block element first.
What is the difference between an ordered list and an unordered list in HTML?
Ordered list: numbered
Unordered list: bullet points
Worth noting that the “li” tag stands for list item.
Is an HTML list a block element or an inline element?
Block element
What HTML tag is used to link to another website?
The anchor tag or “a” html element.
What is an absolute URL?
The full URL as someone would type it in the search bar. It includes the protocol, the domain, etc.