Lecture 4: Basic HTML Document Structure Flashcards
Every HTML document should begin with a ______
The Document Type Declaration (a.k.a. “Doc Type”)
HTML Tag
The tag that contains the entire HTML document and follows the Document Type Declaration.
(Example: < html >DocContent< / html >)
Document Type Declaration
Starts the HTML document. This tag tells the browser it is about to render an HTML doc. If left OFF => the browser thinks/treats the webpage as though it isn’t following HTML standards and functions in “quirks mode”.
(Example: < ! Doctype html >)
Head Tag
Contains metadata/information about the main content of the document.
(Example: < head >Info on Main Content< /head >)
Meta Tag (1st)
Specifies a web page’s character set for its coding. This is NOT required, BUT always good to include. Meta tags are stand-alone tags, no closing tag needed and they can be self-closing.
(Example: < meta charset =”UTF-8” >)
Title Tag
Required element for valid HTML. Defines Web Page’s Title (visible in browser tab’s text).
(Example: < title >Document Title< / title >)
Body Tag
The nesting parent tag that is the root of all user-visible content
(Example: < body >VisualContent< / body >
Nesting HTML Tags
When a “parent” tag contains (a) smaller “child” tag(s).
Ex: < head >< title >TitleHere< / title >< / head >