User Guide

Coding in XHTML 89
4 Under the Markup Languages pane, in the HTML/XHTML pane, select
Compatibility mode for older browsers (e.g., space before “/>”).
This ensures that your code displays properly in older browsers, for example by
inserting a space before minimized empty tags (
<br /> instead of <br/>).
5 Select Display DTD selection dialog when the XHTML namespace is specified if,
when you select Options > Set Document as XHTML, you want to be able to
choose between inserting the
DOCTYPE declaration for the XHTML Strict,
Frameset, or Transitional DTD, or not inserting/replacing a
DOCTYPE declaration.
The dialog box that appears has options to Always replace with this DTD or Dont
ask me again, in case you do not want it to appear again.
If you clear this option, when you set a document as XHTML, no dialog box
appears and no
DOCTYPE declaration is inserted or replaced.
6Click Apply.
You can also set color coding for XHTML, validate against the XHTML 1.0 Strict
specification, and specify the priority of XHTML in the Tag Definitions Library. For
details, see “Using Color Coding Schemes” on page 95, Validating Code” on page
102, and Working with Tag Definitions on page 106.
Enabling XHTML support in a document
This section describes how to enable XHTML support for a document. Once the
program recognizes a document as XHTML, it displays XHTML Tag Editors, and the
attribute table and completion options in Tag Inspector and Tag Insight are
appropriate for XHTML.
To validate against the XHTML 1.0 specification, see “Validating Code” on page 102.
To automatically enable XHTML support, do one of the following:
Create a document with one of the templates available in the File > New >
XHTML dialog box (Strict, Transitional, or Frameset)
Open or create a document containing a Strict, Transitional, or Frameset
DOCTYPE
declaration
To manually enable XHTML support:
1Select Options > Set Document as XHTML for the current document.
This will have no effect if the current document is read-only.
2If Options > Settings > Markup Languages > XHTML/HTML > Display DTD
selection dialog when the XHTML namespace is specified is selected, a dialog
box appears. Select the
DOCTYPE declaration for the DTD that you will use (there
are three versions of the XHTML 1.0 specification).
Select No replacement if you do not want to change or add a
DOCTYPE declaration,
for example if you are writing XHTML code to include in another page that
already has its own DOCTYPE declaration.