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.

Expression Web 2 can work with any DOCTYPE; in fact, you’ll find the following seven in the Code Snippets library:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/ TR/html4/frameset.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/ strict.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/ TR/html4/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/ DTD/xhtml11.dtd"> ...

Get Microsoft® Expression® Web 2 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.