XML technologies / ePUB / CSS essentials / Important CSS properties / Paragraphs

(Excerpt from “E-Books mit ePUB ─ Von Word zum E-Book mit XML” by Dr. Victor Wang)

The table lists the main CSS properties for paragraph formatting, with possible values and an example each.

text-indent

Indentation

Indents the first text line; negative values are allowed

Values

<Länge> | <Prozent> | inherit

Example

text-indent: 20px;

text-align

Horizontal alignment

Sets text alignment (justify = justified)

Values

left | right | center | justify | inherit

Example

text-align: center;

white-space

Preformatting

Sets preformatting:

1) pre: displays all spaces and line breaks in the text.

2) nowrap: no wrapping, even when text overflows

3) pre-wrap: as 1), but wraps at the line end

Values

normal | pre | nowrap | pre-wrap | pre-line | inherit

Example

white-space: pre;

line-height

Line height

Sets the height of each text line

Values

normal | <number> | <Länge> | <Prozent> | inherit

Example

line-height: 1.3em;

   

 

 

 

back to top