Starting Your Web Page

At its most basic level, each of your HTML documents should contain the following components, as shown in Image:

• The DOCTYPE

• The html element (with the lang attribute, which is optional but recommended)

• The head element

• The character encoding in a meta element

• The title element (you’ll add its content in a bit)

• The body element

Image Here’s the foundation of every HTML page. The indentation doesn’t matter, but the structure is crucial. In this example, the default language (per the lang attribute) is set to en for English. ...

Get HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.