HTML Flashcards
Where do you put non-visible content about the HTML document?
Within the head element
Where do you put visible content about the HTML document?
Within the body element
Where do the <head> and <body> tags go in a valid HTML document?
After the doctype declaration element and within the html element
What is the purpose of a <!DOCTYPE> declaration?
To let the browser know which version of HTML the page is formatted for
Give five examples of HTML element types
P, style, script, div, span
What is the purpose of the HTML attributes?
To give additional details about the content
Give an example of an HTML entity (escape character)
Escape characters allow you to use characters normally reserved for HTML coding, such as ® for ®
How do block-level elements affect the document flow?
These elements start on a new line
How do inline elements affect the document flow?
These elements continue on the same line
What are the default width and height of a block-level element?
Width is 100% and height is auto
What are the default width and height of an inline element?
They are both auto (fill in as much space as is necessary)
What tags are necessary for a complete HTML skeleton?
Bare minimum include: <!DOCTYPE>, <HTML>, <Head>, <title>, <body></title>
What kind of content belongs within the <head> of an HTML document?
Meta information about the page (ie, <title>, <style>, <meta></meta>, <link></link>)</style></title>
What type of content belongs within the <body> of an HTML document?
Contains all of the visible contents of the page (ie, <h1>, <p>, <img></img>, <table>, <input></input>, <list>)</list>
Where must the DOCTYPE declaration appear in a valid HTML document?
At the top to tell the browser immediately what version of HTML is on that page
Do all HTML elements require a closing tag?
No, some are self-closing, like <img></img>, <input></input>, <meta></meta> because they cannot contain content like other tags, like <h1> <p>