HTML Flashcards
Where do you put non-visible content about the HTML document?
head holds information about the page, holds the metadata
Where do you put visible content about the HTML document?
body holds what will be displayed on the page
Where do the head and body tags go in a valid HTML document?
Within the html element
What is the purpose of a !DOCTYPE declaration?
Tells the browser what sort of document it will be encountering (HTML 4 or 5, XHTML, XML, etc.)
Give five examples of HTML element types.
head, body, p, img, h1
What is the purpose of HTML attributes?
They give additional information about the element that they are on
Give an example of an HTML entity (escape character).
< and the copyright symbol (©
, & copy ;) are both HTML entities (also called escape characters). They will always have ampersand and semicolon (not required but should be there)
How do block-level elements affect the document flow?
Block-level elements appear on a separate line (they are a block)
- Elements after block-level elements will be on a new line because the block takes up the whole width of the line, leaving no room for the next element
How do inline elements affect the document flow?
Inline elements will affect the text in the line, not creating a new line for a new block
What are the default width and height of a block-level element?
Takes up the full width available (100%). Default height is that of the content (auto).
What are the default width and height of an inline element?
Only takes up as much width as necessary (auto). The height is that of the content (exactly) (auto).
What is the difference between an ordered list and an unordered list in HTML?
Browsers will display ordered list with a progression (1, 2, 3, …) while unordered lists will be shown with just bullets
Is an HTML list a block element or an inline element?
HTML lists are block elements (ol, ul, and li)
What HTML tag is used to link to another website?
Anchor tag a href=””
What is an absolute URL?
Has enough information to get to the desired page
Starts with a domain name, followed by a path to the page/file