4
HTML Documents Need Good Structure
In This Chapter
Creating basic HTML document structure
Defining an HTML document header
Creating a full-bodied HTML document
The framework for a simple HTML document consists of a head and body. The head provides information about the document to the browser (and sometimes also to the web server), and the body contains content that appears in the browser window. The first step in creating any HTML document is to define its framework.
This chapter covers all major elements needed to craft basic structure for an HTML document — including its head and body. We also show you how to tell a browser which version of HTML you’re using. Although version information isn’t strictly necessary for users, browsers use it to make sure they display document content correctly.
Establishing a Document Structure
Although no two HTML pages are alike — each employs a unique combination of content and elements to define a page — every properly constructed HTML page follows the same basic document structure:
A statement that identifies the document as an HTML document ...
Get Beginning HTML5 and CSS3 For Dummies 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.