HTML Flashcards
Where do you put non-visible content about the HTML document?
Inside the opening tag and closing tag of the head element.
Where do you put visible content about the HTML document?
Inside the opening tag and closing tag of the body element.
Where do the head and body tags go in a valid HTML document?
Inside the opening and closing tags of the html element.
What is the purpose of a document type declaration?
To inform the browser of which version of the HTML is being used.
Give five examples of HTML element types.
h1-h6 p img ul/ol div em strong
What is the purpose of HTML attributes?
Configure an element to make it more unique with additional behavior.
Give an example of an HTML entity.
ampersand: &
trademark symbol
copyright symbol
What do all HTML entities require?
All HTML entities start with an & (ampersand) and end with a ; (semi-colon).
How do block-level elements affect the document flow?
Block-level elements:
- start on a new line
- take up 100% width available
- push elements that come after it to the next new line
How do inline elements effect the document flow?
Inline elements:
- takes up just the amount of space they need
- stays “inline”
What are the default width and height of a block-level element?
width: 100%
height: auto
What are the default width and height of an inline element?
width: auto
height: auto
What would happen if we place a span element inside a p element?
The span element will still show up on the same line since the span element is an inline element. IF the p element is inside the span element, the p element will show up on the next line!
What is the difference between an ordered list and an unordered list in HTML?
Ordered list (ol) is notated with numerical symbols that shows order. Unordered list (ul) is notated with bullet points. Both are customizable with CSS.
Is an HTML list a block element or an inline element?
block-level element