HTML Flashcards
Where do you put non-visible content about the HTML document?
The head element. (metadata)
Where do you put visible content about the HTML document?
The body element.
Where do the head and body tags go in a valid HTML document?
The head and body elements are located within the html element as siblings. The starting tags go at the beginning of the element.
What is the purpose of a DOCTYPE declaration?
Declaration lets the browser know what version of HTML it is.
Give five examples of HTML element types.
h1, img, p, span, div
What is the purpose of HTML attributes?
Attach additional data to an element and its content.
Give an example of an HTML entity (escape character).
& followed by copy; for copyright symbol.
How do block-level elements affect the document flow?
Block-level elements start on a new line and take up the whole width of the containing block.
How do inline elements affect the document flow?
Inline elements happen within a line. Not breaking the flow and staying within the boundaries of the tags.
What are the default width and height of a block-level element?
Width: entire horizontal space of container.
Height: height of content within element.
What are the default width and height of an inline element?
Width/Height: only as much as the element needs.
What is the difference between an ordered list and an unordered list in HTML?
○Ordered list is sorted in order, whilst unordered list isn’t (order of list items doesn’t matter).
Is an HTML list a block element or an inline element?
ul, ol, and li are all block elements.
What HTML tag is used to link to another website?
a, with the attribute href=”url” to determine where the link will take the user.
What is an absolute URL?
Domain name + path to page (if not included, takes user to homepage).