HTML Flashcards
Where do you put non-visible content about the HTML document?
Between the head element opening and closing tags.
<head>
</head>
Where do you put visible content about the HTML document?
Between the body element opening and closing tags.
<body>
</body>
Where do the <head> and <body> tags go in a valid HTML document?
Between the doctype declaration and the HTML element opening and closing tags.
<!DOCTYPE html>
<html>
</html>
What is the purpose of a <!DOCTYPE> declaration?
Tells the browser what type of document is being declared/which version of HTML is being used
Give five examples of HTML element types.
HTML, head, body, p, h1-h6, title
What is the purpose of HTML attributes?
Provides information about the content of an element
Give an example of an HTML entity (escape character).
Ampersand = &
accent on e = é
How do block-level elements affect the document flow?
They create elements that will start on a new row and use the entirety of the row (horizontal space)
How do inline elements affect the document flow?
- Appears on the same line as their neighboring elements.
- Depending on the element they can manipulate the style of text content
What are the default width and height of a block-level element?
- Occupies the entire horizontal space of its parent element and height of its content
- The default height is the height of the content and the width is the entire length of the page
What are the default width and height of an inline element?
The default height and width is the height of the content and the width of the content
What is the difference between an ordered list and an unordered list in HTML?
Ordered lists are numbered (alphabetical, etc.) and unordered lists begin with a bullet point (squares, etc.)
Is an HTML list a block element or an inline element?
Block element
What HTML tag is used to link to another website?
Anchor tag and href attribute
<a> </a>
What is an absolute URL?
The full web address of a site to visit a specific page
(domain name for that site, followed by the path to a specific page)
Using anchor tags