HTML Flashcards
Where do you put non-visible content about the HTML document?
Within the head tag
-Also known as meta data (gives us ability to further describe our document)
Where do you put visible content about the HTML document?
Within the body tag
Where do the head and body tags go in a valid HTML document?
The head and body tag are children elements of the HTML tag. These tags are siblings
What is the purpose of a doc type declaration?
Tells the browser which version of HTML the page is written in
purpose: ensures that the web page is parsed the same way by different web browsers
Give five examples of HTML element types.
Head, body, title, paragraph, span, div, etc.
What is the purpose of HTML attributes?
Provide additional info about the contents of an element
- Found in opening tag of an element
- Made up of the attribute name and value
Give an example of an HTML entity (escape character).
& copy ; = copy right symbol
& lt ; = less than
*no space
How do block-level elements affect the document flow?
They will always start on a new line in the browser and take up the entire horizontal space it occupies
How do inline elements affect the document flow?
They continue on the same line as their neighboring elements; will only take as much space as it needs
What are the default width and height of a block-level element?
Width: takes up full width; 100%
Height: equal to height of its content or auto
What are the default width and height of an inline element?
Width: auto; as much as needed
Height: auto; as much as needed
What is the difference between an ordered list and an unordered list in HTML?
- Ordered list are numbered to indicate order
- Unordered list have bullet points
Is an HTML list a block element or an inline element?
Block
What HTML tag is used to link to another website?
The <a> anchor tag w/ href attribute</a>
</a>
What is an absolute URL?
Absolute - a full web address for a different site