HTML & CSS Flashcards
Where do you put non-visible content about the HTML document?
Within the <head> element
Where do you put visible content about the HTML document?
Within the <body> element
Where do the <head> and <body> tags go in a valid HTML document?
Nested inside of the <html> element
What is the purpose of a <!DOCTYPE> declaration?
The doctype declaration tells the browser which version of html the page is using
Give five examples of HTML element types.
H1-h6, p, img, body, div
What is the purpose of HTML attributes?
Attributes provide additional information about the contents of an element
Give an example of an HTML entity (escape character)
” & a m p ; “
How do block-level elements affect the document flow?
Block elements will always appear to start on a new line and take all of the horizontal space.
How do inline elements affect the document flow?
Inline elements appear to continue on the same line as their neighboring elements.
What are the default width and height of a block-level element?
A block level element takes up the width of its parent element and the height equal to the vertical space of its contents
What are the default width and height of an inline element?
The height and width of an inline element are exactly the height and width of its contents
What is the difference between an ordered list and an unordered list in HTML?
An ordered list displays list items in numbers whereas an unordered list displays list items in bullet points
Is an HTML list a block element or an inline element?
Block element
What HTML tag is used to link to another website?
<a> anchor element with an href attribute</a>
What is an absolute URL?
A URL that links to an external website, containing the full path ex: “https://google.com/”
What is a relative URL?
A URL that links to a different page of the same website, using a shorthand path ex: “index.html”
How do you indicate the relative link to a parent directory?
../index.html
How do you indicate the relative link to a child directory?
music/listings.html
How do you indicate the relative link to a grand parent directory?
../../index.html
How do you indicate the relative link to the same directory?
index.html
What is the purpose of an HTML form element?
It allows a site to collect user input information