The TCP/IP Guide - Version 3.0 (Contents) ` 1529 _ © 2001-2005 Charles M. Kozierok. All Rights Reserved.
However, HTML goes far beyond just this; it defines a full set of text codes for describing
nearly every aspect of how a document is shown to a user. This includes instructions for
formatting text (such as defining its color, size and alignment), methods for displaying
tabular data, specifications for how to present images and other media along with the
document, interactive forms and much more. In theory, the language is only supposed to
define the document and leave up to the browser how it should be displayed, but in
practice, modern HTML documents also usually contain rather specific instructions for how
their information should be presented.
To do justice to HTML, I would have to devote several dozen pages to the subject. I have
decided not to do this, because even though HTML is an important part of the Web, it is
actually not that important in understanding how the Web works. Knowing HTML is
essential if you are writing Web content, and is also critical if you want to understand how to
write Web software. Perhaps ironically though, to the actual mechanisms that make the
Web work, such as HTTP, “a document is a document”. HTTP is not designed under the
assumption that it will transfer HTML, and servers in most cases do not even look at the
contents of an HTML file—they just transfer it.
That said, a basic understanding of HTML is important, and it just wouldn't seem right not to
provide at least an overview of the language, so I will do that here. I encourage you to seek
out one of the many good HTML resources if you want to learn more: there are dozens of
them on the World Wide Web (where else? ☺)
HTML Elements and Tags
In simplest terms, an HTML document is a plain ASCII text file like an e-mail message or
other text document. The biggest difference between HTML and regular text, however, is
that HTML documents are structured. The document is logically organized into a series of
elements that are arranged according to the rules of the language. Each element defines
one part of the document as a whole. For example, the title of a document, a paragraph, a
table and a hyperlink to another document are all examples of elements.
Each element is described using special text tags that follow a particular syntax. Each tag
begins with the “<” symbol, which is then followed by the (case-insensitive) element name,
and optionally, additional parameters that describe the element. The tag ends with the “>”
symbol. Here's how a tag looks generally:
<element parameter1=“value1” parameter2=“value2”…>
Some elements are entirely described by the presence of a tag, and in such cases that tag
is the entire element. More often, tags occur in pairs surrounding the actual content of the
element; the start tag begins with the name of the element and the end tag begins with the
name of the element preceded by a slash symbol. For example, the title of a document is an
element defined as follows:
<title>This Is A Great Story</title>