Styling properties

CSS has many styling properties, including text properties (dealing with fonts and character styles), colours and backgrounds, margins, and whitespace around elements, and general object type classifications.


Wherever colours are allowed, the choice is from 'aqua', 'black', 'blue', 'fuchsia', 'gray', 'green', 'lime', 'maroon', 'navy', 'olive', 'purple', 'red', 'silver', 'teal', 'white' and 'yellow'. An RGB value can be given, with the keyword 'rgb(r, g, b)' ('r' represents red, 'g' represents green and 'b' represents blue), or with a hexadecimal number in the form '#rgb' or '#rrggbb'. The examples below are equivalent:

emph   { ... ; color: rgb(128, 0, 255)  }

emph   { ... ; color: #8000FF  }


Wherever sizes are allowed, ...

Get XML Companion, The, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.