HTML and CSS Reference
In-Depth Information
2.4. HTML Skeleton
Notice, too, that our simple example HTML document starts and ends
with <html> and </html> tags. These tags tell the browser that the entire
document is composed in HTML. [*] The HTML and XHTML standards re-
quire an <html> tag for compliant documents, but most browsers can de-
tect and properly display HTML encoding in a text document that's miss-
ing this outermost structural tag. [ <html>, 3.6.1 ]
[*] XHTML documents also begin with the <html> tag, but they contain additional information to differ-
entiate them from common HTML documents. See Chapter 16 for details.
Like our example, except for special frameset documents, all HTML and
XHTML documents have two main structures: a head and a body , each
bounded in the source by respectively named start and end tags. You put
information about the document in the head and the contents you want
displayed in the browser's window inside the body. Except in rare cases,
you'll spend most of your time working on your document's body con-
tent. [ <head>, 3.7.1 ] [ <body>, 3.8.1 ]
There are several different document header tags that you can use to
define how a particular document fits into a document collection and into
the larger scheme of the Web. Some nonstandard header tags even an-
imate your document.
For most documents, however, the important header element is the
title. Standards require that every HTML and XHTML document have a
title, even though the currently popular browsers don't enforce that rule.
Choose a meaningful title, one that instantly tells the reader what the
document is about. Enclose yours, as we do for the title of our example,
between the <title> and </title> tags in your document's header. The
popular browsers typically display the title at the top of the document's
window. [ <title>, 3.7.2 ]
Search WWH ::

Custom Search