HTML Flashcards
Where do you put non-visible content about the HTML document?
in the 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?
inbetween the html tags
What is the purpose of a <!DOCTYPE> declaration?
tells the browser what version of html the document is written in
give 5 examples of html element types
h1-6, <a>, <strong>, <body>, <br></br>, <div>, <span>, <img></img>, …</span></strong></a>
What is the purpose of HTML attributes
to add additional information (attributes) to elements. Name to the image, etc etc etc, link to image
Give an example of an HTML entity (escape character)
Copyright, ©
How do block-level elements affect the document flow?
they always take up the full width of the containing block and start a new line
How do inline elements affect the document flow?
only take up the amount of context within the elements
dont take up a new line
content after it is on the same line
basically they share space
What are the default width and height of a block-level element?
width: 100%
height = the height of the content
(height: auto)
What are the default width and height of an inline element?
width: auto
height: auto
What is the difference between an ordered list and an unordered list in HTML?
one has numbers one has bullets
Is an HTML list a block element or an inline element?
block
What HTML tag is used to link to another website?
<a> aka anchor</a>
called anchor because initial purpose was like how on wikipedia there’s the list of things you can click to go down the page, then it stops where you want, like an anchor
What is an absolute URL?
a link to another site, always starts with http/https