### 30.3 Mapping character formats

You can specify HTML tags to be used for character formats; for example:

    [CharTags]
    ; Document character format name = HTML starting element name(s)
    ; use strong, em, code, cite, var, or blink, or span for HTML elements
    Emphasis=strong
    ProgramListing=code

Although the format properties listed here are the only valid HTML styles, DITA2Go lets you specify any tag, to permit XML markup and CSS span class assignments. However, only valid HTML tags have an effect in DITA2Go HTML output.

For XHTML, all format names must be lowercase.

Include attributes

To add attributes to a character tag, list them after the tag. For example:

    [CharTags]
    Bold = strong type="bold"

Everything after the first space is removed for the end tag. To apply an attribute to an individual instance of a character format, insert an attribute PI marker in the inline element; see §38.3 Adding attributes with PI markers. For this example, you would use a PI marker of type CharType with content bold (no quotation marks).

If no tags are specified in [CharTags] for a particular character format, by default that format gets a span class; see §31.7.3 Mapping character formats to tags or span classes.

Suppress tags

To eliminate style tags entirely, map the character format to nothing:

    [CharTags]
    CharFmt =

See also:

§23.3.1 Deriving XML tags from format and class names

§31.7.3 Mapping character formats to tags or span classes

Previous Topic: 30.2.6 Eliminating unwanted paragraphs

Next Topic: 30.4 Assigning properties to text formats

Parent Topic: 30. Mapping text formats to HTML/XML

Sibling Topics:

30.1 Choosing how to map formats

30.2 Mapping paragraph formats

30.4 Assigning properties to text formats

30.5 Mapping special characters

30.6 Mapping fonts

30.7 Managing typographic elements for HTML or XML

30.8 Specifying text colors for HTML

30.9 Configuring preformatted text for HTML/XML

30.10 Converting footnotes to HTML or XML

30.11 Converting list formats to HTML (deprecated)

Table of Contents • Index