Creating the HTML, Head, and Body Sections

All your HTML coding—except the DOCTYPE—should be placed within the two-sided tag <html>. Recall from Chapter 1, that when a tag is two-sided, it requires a corresponding closing tag that is identical to the opening tag but contains a slash: </html>. The tags <html> and </html> serve as a "wrapper" around all the other tags in the document.

In addition, your document should have two sections: a Head and a Body. The Head section is defined by the two-sided tag <head>. The Head section contains the page title, which is the text that will appear in the title bar of the Web browser and on the Microsoft Windows taskbar button. It also includes information about the document that is not displayed, such as its ...

Get HTML and XHTML Step by Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.