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.

Colours

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  }

Sizes

Wherever sizes are allowed, ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.