HTML Flashcards
Where do you put non-visible content about the HTML document?
The head element. It contains metadata - information about the data aka information about the website not seen by the user or displayed on the webpage
Where do you put visible content about the HTML document?
The body element. Content in the body element will be displayed on the webpage
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?
To inform the browser which version of html is being used. !DOCTYPE html tells the browser to use the most up to date (or recent) version of html, which is currently html 5.
Give five examples of HTML element types
heading (h1, h2, etc), img, span, body, html
What is the purpose of HTML attributes?
to add information that configures or adjusts the behavior of elements
Give an example of an HTML entity (escape character)
& copy ; © (copyright symbol)
& reg ; ® (registered trademark)
Note - no spaces between the ampersand, letters, and semi-colon
How do block-level elements affect the document flow?
Block-level elements take up the entire width of their container. An element placed after a block element in html will appear below it on a new line.
How do inline elements affect the document flow?
Inline elements only take up the space they need (aka the space of their content)
What are the default width and height of a block-level element?
Height - is the height of its content
Width - is the width of its container
What are the default width and height of an inline element?
Height: Auto
Width: The width of its content
What is the difference between an ordered list and an unordered list in HTML?
An ordered list is used for organized ordered content in a numbered list. An unordered list is used for lists where organization does not mater; they are displayed with bullet points.
Is an HTML list a block element or an inline element?
An HTML list is a block element. (the li elements within ul or ol are also block elements themselves)
What HTML tag is used to link to another website?
Anchor element: a href=”””
What is an absolute URL?
A link to an external source