XML technologies / DocBook / Generating (X)HTML / Formatting (X)HTML with CSS / A short introduction to CSS
(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)
A CSS rule consists of two parts: a selector and a declaration. The selector determines which element the style applies to. The declaration consists of one or more property–value pairs (see the following example).
Example: Syntax of a CSS rule
Selektor
{
Eigenschaft-1: Wert-1; \
... | Deklaration
Eigenschaft-n: Wert-n; /
}
The following CSS rule formats all h2 elements in bold with a large font:
h2 {
font-size: large;
font-weight: bold;
}
Copyright © 2009 Millin Verlag
You may print the online version for your private use.
Otherwise, this chapter from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Millin Verlag, Siebengebirgsring 36, 53797 Lohmar, info(at)millin.de
back to top