IN THIS CHAPTER
Specifying document type
The overall document structure: HTML, Head, and Body
Block elements: markup for paragraphs and other blocks of content
Inline elements: markup for characters
Special characters (entities)
Linking to other pages
Putting it all together
HTML has come a long way from its humble beginnings. However, despite the fact that you can use HTML (and its derivatives) for much more than serving up static text documents, the basic organization and structure of the HTML document remains the same.
Before we dive into the specifics of various elements of HTML, it is important to summarize what each element is, what it is used for, and how it affects other elements in the document. This chapter provides a high-level overview of a standard HTML document and its elements. Subsequent chapters cover each element and technology in detail.
One attribute of HTML documents that is frequently overlooked is the
<!DOCTYPE> tag, used to specify a Document Type Definition (DTD). This definition precedes any document tags and exists to inform HTML clients of the format of the following content — what tags to expect, methods to support, and so forth.
You can think of the DTD as a packing list of sorts that tells the user agent and other clients that read the document what to expect (and not expect) in the document. As such, the client can act more intelligently, ...