IN THIS CHAPTER
Specifying Document Type
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 content that follows—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, enabling the client to act more intelligently, ...