## 22.5 Understanding how CSS affects other options

The choice to use CSS changes the behavior of certain other options. Be aware of the following:

Using CSS turns off <font> tags by default

Using CSS changes some default values

Not using CSS changes other default values.

Using CSS turns off <font> tags by default

When UseCSS=Yes, the default value for [HTMLOptions]NoFonts results in removal of <font> tags; these tags are deprecated, and are not needed with CSS.

However, if you specify UseCSS=Yes and then do not supply or create a CSS file, text appearance in your HTML output still depends on <font> tags, which are no longer present unless you explicitly set [HTMLOptions]NoFonts=No in the configuration file. Therefore, the text in your document might not come out the way you expect.

See §21.7.4 Including or excluding font tags.

Using CSS changes some default values

When UseCSS=Yes, default values are reversed for the [Graphics] and [HtmlOptions] settings listed in Table 22-2. This removes most HTML that can interfere with CSS settings. (One exception is [HTMLOptions]AllowOverrides, which defaults to Yes for HTML (but not for XML or DITA) to retain any incidental use of bold and italic in text.)

Not using CSS changes other default values

When UseCSS=No, default values are reversed for the [CSS] settings listed in Table 22-2.

Table 22-2 CSS-dependent default values of options

Section | Option | Default value of option when: | Ref.
UseCSS=Yes | UseCSS=No
[CSS] | LinkClassIsParaClass | Yes | No | 19.2.2.2
NoClassLists | No | Yes | 21.12.2.6
WriteClassAttributes | Yes | No | 22.4.2
WriteCssStylesheet | Once | Never | 22.4.2
WriteCssLink | Yes | No | 22.4.2
XrefFormatIsXrefClass | Yes | No | 22.7.8
[Graphics] | GraphAlignAttributes | No | Yes | 23.6.2
[HtmlOptions] | AlignAttributes | No | Yes | 21.5
Basefont | No | Yes | 21.7.1
NoFonts | Yes | No | 21.7.4

| 22.4.5 Understanding effects of the older Stylesheet setting |  | 22.6 Linking to alternate CSS files |