Set document type information

Browsers read the DocType declaration on pages to determine which version of HTML the page uses. You can set a default DocType so that Microsoft Expression Web automatically inserts a DocType declaration on new pages. You can also choose not to automatically insert a DocType declaration on new pages. Here's an example of a DocType declaration:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">

The DocType declaration on a web page also determines the schema Expression Web uses to drive incompatibility notifications and IntelliSense for HTML and script. Expression Web uses the secondary schema if a page has an unrecognized or missing DocType. If there is an incompatibility or error in your HTML, Expression Web adds an icon to the status bar. The Code Error Detected icon Cc295208.ce9aa591-79eb-4304-8fba-f4ef8eaac11d(en-us,Expression.10).gif indicates an error in the code on your page. The HTML Incompatibility Detected icon Cc295208.fa01a755-ef45-4902-8501-b3ebf05e35ae(en-us,Expression.10).gif indicates an incompatibility in your code with the HTML schema you selected.

For information about setting CSS schema options, see IntelliSense for cascading style sheets.

For information about setting other IntelliSense options, see Set IntelliSense options.


Pages which do not have a DocType declaration appear with Quirks in the status bar at the bottom of the window.

To set the default DocType declaration that Expression Web inserts when you create new pages

  1. On the Tools menu, click Page Editor Options.

  2. In the Page Editor Options dialog box, on the Authoring tab, select the Doctype and Secondary Schema you want to use for all new files.


    To prevent Expression Web from inserting a DocType declaration, in the Doctype box, select None.

To change the DocType declaration in an existing page

  1. In the Code view of your page, do one of the following:

    • If there is already a DocType declaration in the page, select the entire DocType declaration.

    • If there is not a DocType declaration in the page, put your cursor at the very top of the page before all other code in your page.

  2. Do one of the following:

    • Press CTRL+ENTER.

    • On the Edit menu, point to IntelliSense, and then click List Code Snippets.

    • On the Code View toolbar, click the List Code Snippets button Cc295208.8783702d-6889-4dc3-b337-e732062bf2cd(en-us,Expression.10).gif.

  3. In the list of code snippets, do one of the following:

    • Type the keyword for the code snippet, and then press ENTER or TAB to insert it.

    • Select the code snippet you want to insert, and then press ENTER or TAB to insert it.

    • Double-click the code snippet you want to insert.

See also


Add or remove byte order marks

Generate a compatibility report

Status bar