Optimize the source code of a single page

Microsoft Expression Web can remove specified HTML from the current web page, such as comments in your source code, unnecessary whitespace, unused styles, and empty tags.

Tip

If you want to optimize the source code of an entire website, you can set Expression Web to do so when you publish your website. That method removes specified code from those pages only when you publish them to your remote website. It maintains that code in the pages on the local site. For more information, see Optimize the source code of a website.

To optimize the HTML of a Web page

  1. In Design view or Code view, with your web page open, on the Tools menu, click Optimize HTML.

  2. In the Optimize HTML dialog box, select the items that you want removed from the page, and then click OK.

    If you want to restore the settings to their defaults, click Restore Defaults.

See also

Concepts

Optimize the source code of a website