HTML Flashcards
Where do you put non-visible content (metadata) about the HTML document?
in the head element
Where do you put visible content (to the user) about the HTML document?
in the body element
Where do the head and body tags go in a valid HTML document?
between the opening and closing tags of the html element
What is the purpose of a doctype declaration?
instructs the web browser on which version of HTML to use when reading the code
Five examples of HTML element types
a, b, strong, em, html, form, img
What is the purpose of HTML attributes?
they provide additional information to an element’s content (e.g color)
What is an example of an HTML entity?
an ampersand, caret, money symbols, copyright, trademark, symbols that are typically used in HTML code (less than/equal than), symbols not on the keyboard
How do block-level elements affect the document flow?
Take up the entire width of the parent container; It creates a new line. other elements are pushed below or above it.
How do inline elements affect the document flow?
They are able to exist on the same line as other inline elements; no new line is created
What are the default width and height of a block-level element?
The default width is the entire width of its parent element/container, the height is the height of the content (auto)
What are the default width and height of an inline element?
The default width and heigh of an inline element is the width and height of its content (auto for both)
What is the difference between an ordered list and unordered list in HTML?
An ordered list has an emphasis on the order of the listed items; it uses numbers to sequentially list the items.
An unordered list uses bullet points for the listed items; order of the items does not matter
Is an HTML list a block element or an inline element?
unordered list, ordered list, and list items are all block elements
What HTML tag is used to link to another website?
anchor / a tag
What is an absolute URL
takes you to an external page or domain ( another website URL), not in current webpage