Exporting to XHTML is an easy way to get your InDesign contents into web-ready form. When you export contents to XHTML, you can control how images are exported, but the formatting of text is not preserved. However, InDesign preserves the names of paragraph, character, object, table, and cell styles applied to the exported contents by marking the XHTML contents with CSS style classes of the same name. Using a CSS-capable HTML editor, such as Adobe Dreamweaver or Adobe GoLive, you can quickly apply formatting and layout to the contents.
A document with the specified name and an .html extension (such as “newsletter.html”) is created; if specified, a web images subfolder (such as “newsletter web images”) is saved in the same location.
In the XHTML dialog box (File > Cross-media Export > XHTML / Dreamweaver), specify the following options.
The General area includes the following options.
If Document is selected, all page items from all spreads are exported, except for master page items that have not been overridden and page items on invisible layers. XML tags and generated indexes and tables of contents are also ignored.
From the Copy Images menu, determine how images are exported to HTML.
Choose Adaptive to create a palette using a representative sample of colors in the graphic without any dithering (mixing of small spots of colors to simulate additional colors). Choose Web to create a palette of Web-safe colors that are a subset of Windows and Mac OS system colors. Choose System (Win) or System (Mac) to create a palette using the built‑in system color palette. This choice may cause unexpected results.
Use the Advanced area to set CSS and JavaScript options.
When exporting to XHTML, you can create a list of CSS styles that appears in the Head section of the HTML file with empty declarations (attributes). You can edit later these declarations in an HTML editor such as Dreamweaver. You can choose No CSS to omit the CSS section, or you can specify an external CSS. If you select External CSS, specify the URL of the existing CSS style sheet, which is usually a relative URL, such as “/styles/style.css.” InDesign does not check whether the CSS exists or is valid, so you’ll want to use your HTML editor to confirm your external CSS setup.