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
What is a relative URL?
link to a local file in your lil’ file place. begins with a / or . or ..
How do you indicate the relative link to a parent directory?
use ../
How do you indicate the relative link to a child directory?
directory/
How do you indicate the relative link to a grand parent directory?
../../
How do you indicate the relative link to the same directory?
just use the file name 4head, sometimes ./ is needed
What is the purpose of an HTML form element?
a boundary to hold all the content to submit
input, select, button, textarea, option
Give three examples of type attribute values for HTML <input></input> elements.
checked, alt, accept, capture
Is an HTML <input></input> element a block element or an inline element?
in line
What are the six primary HTML elements for creating tables?
table, thead, tbody, tr, td, th, tfoot
What purpose do the thead and tbody elements serve?
head makes the headers of the table body is where the data goes
Give two examples of data that would lend itself well to being displayed in a table.