Choosing and Using the Right DOCTYPE

A DOCTYPE is a declaration at the very beginning of an HTML/XHTML file that tells the browser what kind of document it’s receiving. A valid DOCTYPE is the very first thing you need to make sure your page(s) will validate.

In addition to making a page valid, there’s an added benefit to a correct DOCTYPE: predictable browser rendering. To deliver consistent display in all browsers, the browser needs to be told what kind of file it’s displaying.

Troubleshooting

By default, Expression Web inserts an XHTML 1.0 Transitional DOCTYPE on every page it creates and ensures that the code is appropriate for the DOCTYPE. The only time you need to consider the DOCTYPE is when you’re working on an existing site that was created ...

Get Microsoft® Expression® Web Step by Step now with O’Reilly online learning.

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