HTML Flashcards
Where do you put non-visible content about the HTML document?
In the head element
Meta data e.g. Title are in the head element
Where do you put visible content about the HTML document?
In the body element
E.g. h1-h6, p, ul, ol, li elements
Where do the head and body tags go in a valid HTML document?
In the html element (head element is above the body element)
What is the purpose of a DOCTYPE declaration?
To tell the browser what type of document is being used
specifically with HTML it was used for which version of HTML was being used
Give five examples of HTML element types.
head body h1 - h6 p ul ol li div
What is the purpose of HTML attributes?
To provide additional information on the content of an element
E.g. Class, ID, src…
Give an example of an HTML entity (escape character).
Less Than < Greater Than > Ampersand & Cent ¢ Pound £ Yen ¥ Euro € Copyright © Registered trademark ® Trademark ™ Multiplication × Division ÷
How do block-level elements affect the document flow?
Block level elements always start on a new line. They do not allow any other elements on the same line as them.
Example Block Elements: ul ol li h1-h6 p div
How do inline elements affect the document flow?
Inline elements will continue on the same line. They allow other elements to be on the same horizontal line.
Example Inline Elements: button span strong em
What are the default width and height of a block-level element?
Width: width of its containing block
Height: height of content
What are the default width and height of an inline element?
Width: width of content
Height: height of content
What is the difference between an ordered list and an unordered list in HTML?
An ordered list numbers each line in ascending order and an unordered list shows each item next to a bullet point.
OL:
1.
2.
3.
-
-
Is an HTML list a block element or an inline element?
Block element because it lists each item on its own line.
What HTML tag is used to link to another website?
Anchor Tag (the a element)
a href=”link”
What is an absolute URL?
An absolute URL is a link to a specific URL on the web (can be a completed different website [href is the full web address] )
E.g.
a href=”https://www.google.com”