22.2.4 Using
XHTML tagging rules for HTML
Even
if you are creating standard HTML, consider using XHTML tagging. These
are the main points to remember:
- Use
lowercase for element and attribute names.
- Enclose
all attribute values in double quotes.
- Explicitly
close all tags.
- Include
a space after an element name, even in a closing tag (such as <br />).
All current HTML browsers accept these
rules.
When you specify XHTML as your output
type, in addition to a name attribute
for anchors, DITA2Go provides an id attribute;
for example:
<h3><a id="b2d" name="b2d"></a>B2D</h3>
This is because XML expects an id attribute
for many purposes that are handled by the name attribute
in HTML. The only way to suppress the id attribute
is to specify HTML instead of XHTML as the output type.
Previous Topic:
22.2.3 Checking
HTML or XML output files for DITA2Go version
Next Topic:
22.3 Including
starting code and entity references
Parent Topic:
22.2 Setting
up an HTML project
Sibling Topics:
22.2.1 Creating
an HTML or XHTML project
22.2.2 Specifying
a different output file extension
22.2.3 Checking
HTML or XML output files for DITA2Go version
Table of Contents • Index