O'Reilly logo

Beginning HTML5 and CSS3 For Dummies by Chris Minnick, Ed Tittel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4

HTML Documents Need Good Structure

In This Chapter

arrow Creating basic HTML document structure

arrow Defining an HTML document header

arrow 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:

check.png A statement that identifies the document as an HTML document ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required