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 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.