XML technologies / ePUB / CSS essentials / Basic syntax
(Excerpt from “E-Books mit ePUB ─ Von Word zum E-Book mit XML” by Dr. Victor Wang)
CSS is, unfortunately, not an XML-based markup language; it has its own syntax, designed to embed concise style information in HTML when needed.
CSS assigns properties to a selector, initially understood as an XML or HTML element. A declaration uses this syntax:
[Selektor] {[Eigenschaft1]: [Wert1]; [Eigenschaft2]: [Wert2]; . . .} Braces enclose properties, a colon follows each property name, and a semicolon ends each property/value pair.
Examples follow in the table:
Example | Selector | Property | Value |
|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Table: CSS declaration syntax examples
Copyright © mitp 2011
You may print the online version for your private use.
Otherwise, this chapter from “E-Books mit ePUB” is subject to the same terms as the printed edition: the work and all its parts are protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Verlagsgruppe Hüthig Jehle Rehm GmbH, Im Weiher 10, 69121 Heidelberg, kundenbetreuung(at)hjr-verlag.de
back to top