HTML Flashcards
Where do you put nonvisible content about the HTML document?
head
Where do you put visible content about the HTML document?
body
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 tell a browser which version of HTML the page is using
Give five examples of HTML element tags.
head, body, html, span, h1
What is the purpose of HTML attributes?
to describe an element; gives you a way to provide additional information for an element
Give an example of an HTML entity (escape character).
& copy; (no space ofc no space)
How do block-level elements affect the document flow?
block elements will take up the full width of the containing block
only elements following it will be in a new line
How do inline elements affect the document flow?
inline elements continue on the same line
What are the default width and height of a block-level element?
width: 100%
height: automatic
What are the default width and height of an inline element?
width & height: both auto
What is the difference between an ordered list and an unordered list in HTML?
an ordered list is ordered and numbered, while an unordered list is neither
Is an HTML list a block element or an inline element?
block
What HTML tag is used to link to another website?
‘a’ element (with the attribute “href”)
What is an absolute URL?
a URL with “http://” in it
absolute URLs are written in their entirety with the domain name