Controlling the look-and-feel of the output

If an element with no specific semantic difference needs to be formatted differently in the output, you can apply the outputclass attribute to the appropriate element.

The outputclass attribute can be used to specify a particular formatting characteristic during processing to an output deliverable document. Nearly all DITA content elements have an outputclass attribute.

For example, if you want one paragraph to be formatted differently in the output, you could use the attribute as shown in the mark-up:
<p>You need outside mirrors...</p>
<p outputclass="red_highlight">Your car's mirrors...</p>

When generating HTML output, the DITA source outputclass attribute value will be generated as an HTML CSS class attribute.

Normally, the semantic difference between elements should drive formatting, rather than arbitrary and subjective application of outputclass attributes. You should therefore use the outputclass attribute only as a last resort.

For example, if a paragraph (p) element needs to be formatted differently because the paragraph contains a note or tip, the note element, which will be formatted differently to the standard paragraph in the output, should be used, without any need for the outputclass attribute.