HTML Flashcards
Where do you put non-visible content about the HTML document?
Non-visible content goes in the head. meta,title etc etc
Where do you put visible content about the HTML document?
Body element contains all the visible content the viewport will see
Where do the head and body tags go in a valid HTML document?
They go inside of the html tags and are it’s children (with head and body themselves being sibilings.
What is the purpose of a declaration?
The doctype declaration is literally telling the browser which html it’s using.
Give five examples of HTML element types.
head, html, div, body, span, p etc etc A TON of html elements exist. Most noteworthy thing is that DOCTYPE is a declaration and specifically not an element
What is the purpose of HTML attributes?
Attributes can both modify an element further and provide additional information and context for an element. Most notably they will always contain a NAME and VALUE
Give an example of an HTML entity (escape character).
An example of an entity could be < being < All entities begin with & and end with ; If known they can be much more efficient then looking up a symbol could be. As well as writing a symbol that html already has a special purpose for.
How do block-level elements affect the document flow?
Block-level elements always start on a newline and create space on the next line after it is finished.
How do inline elements affect the document flow?
They affect the document much less, as they do not force line breaks.
What are the default width and height of a block-level element?
The default width is 100% because it always takes up the maximum horizontally space wise. Vertically they are auto, and take as much space as necessary.
What are the default width and height of an inline element?
Inline elements width and height wise are auto. They by design take up the minimum space necessary.
What is the difference between an ordered list and an unordered list in HTML?
Ordered lists number things like 1, 2, 3 etc as unordered lists will do something like bullet points.
Is an HTML list a block element or an inline element?
ul and ol and even li are all elements that are block elements.
What are the six primary HTML elements for creating tables?
table, thead, tbody, td, tr, th
What purpose do the thead and tbody elements serve?
thead is the heading, the tbody contains the data