9. Text Properties

9. Text Properties

text-align: left | right | center | justify
Align the text within an element.
Does not affect the width of the containing block, or align a box on a page.
text-decoration: value
Add decoration to text
value can be none, underline, overline, line-through, or blink.
Example:
    a { text-decoration: none; }            /* don't underline links... */
    a:hover { text-decoration: underline; } /* ...unless mouse hovers over them */
    
text-indent: length
Indent the first line of an element. Length can have relative units of em, ex, or px, or absolute units of in, cm, mm, pt, or pc.

I call our world Flatland, not because we call it so, but to make its nature clearer to you, my happy readers, who are privileged to live in Space.
Example: indent the first line of every paragraph
    p { text-indent: 4em; }
    

I call our world Flatland, not because we call it so, but to make its nature clearer to you, my happy readers, who are privileged to live in Space.
Example: hanging paragraphs
    p {
	padding-left: 2em; /* indent all lines */
	text-indent: -2em; /* except the first */
    }
    
Ken Keys, CAIDA, 2006-12-01