What's the basic structure of an HTML document? An HTML document is divided into two major portions: the HEAD and the BODY. The HEAD contains
information about the document; the BODY contains the stuff that will be
displayed in the browser window. The skeletal structure is:
<BODY>Contents of Document</BODY>
What is the <TITLE> tag used for? The TITLE container goes
inside the HEAD container. It provides a description of the page's contents. Avoid vague titles like "Welcome" or
"My Homepage." The title is used:
--at the top of the browser window
--in the HISTORY list (which lists recently-visited sites)
--as the description, when the site is saved in a bookmark file
--by search engines
INFORMATION BROWSERS IGNORE (5b)
Some information in an HTML document is ignored when the document is viewed in a browser:
How do I insert COMMENTS in an HTML document? Browsers will ignore
text between the <!-- and --> symbols. Use comments liberally to de-mystify your HTML code. They can
extend over more than one line. Be sure to put a space after the
initial <!-- and before the final --> , like this:
<!-- This is a comment. It will be ignored by the browser. -->
How do browsers treat "white space" in HTML documents? In general,
browsers will ignore line breaks, tabs, and multiple spaces. So, if you type:
these far apart words
in your HTML document, they'll appear in the browser as:
these far apart words
This is a GOOD feature! It means that you can improve the readability of your HTML code by inserting extra
carriage returns, and spreading things out.
Browsers will also ignore tags that they don't understand.
http://www.cwru.edu/help/introHTML/toc.html (link is no longer valid)
Please read Chapter 2 (DOCUMENT TAGS) and take the quiz at the end of Chapter 2.
(A5.1) Read pages 7273 (from "Nesting HTML Tags" through "Information
Browsers Ignore") and pages 9495 (from "Setting Up Your HTML
Document" through "The Document Body") in the Weasel Book.
(A5.2) Create a file for your homepage; save it as
(I'll refer to this as your "homepage file.")
The "htm" that appears in the file name after the period (.) is
called the filename extension; you can use either "htm" or
"html" as extensions for your HTML files.
(A5.3) Put the head, body, and title tags in your homepage file. Choose
an appropriate title!
(A5.4) Many people like to note the last date that the file was modified
somewhere near the top of their homepage. If you want to do this, type the following
script (EXACTLY as shown here) inside the BODY container. This will automatically
update the revision date, each time you modify your file. (You'll learn more about