Up: style and class attribute



7.1 Text colour

There is no element that adds colour to a tbook document. However you can add a style attribute to most elements and put CSS commands in it. This attribute is then passed to HTML, but the colour information is interpreted for LaTeX output, too. All different ways how to give colour information in CSS are supported. So you may write

<p style="color: red">This is in red.</p>
<p style="color: rgb(0,0,100%)">This is in blue.</p>
<p style="color: rgb(255,255,0)">This is in yellow.</p>
<p style="color: #f783ff">This is a shade of blue.</p>

and will get the desired result. You can also add other CSS commands, however, the XSLT processor will only scan for the color: property. Background colours are not supported. Page colours are not yet supported. (Although both will work in HTML output, of course.)