Chapter 2.1: HTML Document Structure
Language
A set of rules describing how to write HTML; a valid HTML document must follow these rules
True or False: Viewing a web page's source and viewing the browser's internal web page representation always yields identical results
False; the web page's HTML and the browser's internal representation may differ
True or False: To copy the functionality of another web page found on the web, a user can just copy the HTML from the view source page
False; copying and pasting may create identical page structure but the web page may not function identically because the copied page may be missing the images, CSS, and JavaScript necessary for the page to function properly; copying a web page's content may also violate copyright law
<body>The California quarter features Yosemite valley.</body>
HTML content displayed by the browser
<!DOCTYPE html>
Instruction to web browser that specifies the document types
Valid or Invalid HTML Markup: <p>We changed the <strong><em>font</strong></em> in this paragraph.</p>
Invalid; a tag opened inside another must be closed before the outside tag is closed: <strong><em>font</em></strong>
Valid or Invalid HTML Markup: <h1>This is a chapter heading
Invalid; it's missing the closing </h1> tag
Valid or Invalid HTML Markup: <p>Sentence one.<strong>Sentence two.</p>
Invalid; the closing tag </strong> is missing
Markup
Part of a document that explains how to interpret or structure other parts of the document (instruction to browser about the rest of the document)
<html lang="en">
Tag that marks the beginning of the HTML document
</html>
Tag that marks the end of the HTML document
<title>California State Quarter</title>
Tag that names the document
<meta charset="UTF-8">
Tag that specifies the character encoding used in the document
HyperText
Text that contains connections to other documents; connections to other documents are Hyperlinks
True or False: To see how a web page is constructed, a user can view the page source in the browser
True
Valid or Invalid HTML Markup: <p>This is a very short paragraph.</p>
Valid; it has an opening tag and the closing tag
Valid or Invalid HTML Markup: <P>A short paragraph.</P>
Valid; uppercase tags are valid, but it's preferred to use lowercase ones