Text Properties


The following properties affect the visual presentation of characters, spaces, words, and paragraphs.

letter-spacing

Usage

Specifies the spacing behavior between text characters.

CSS1 Values

normal | <length>

CSS2 Values

inherit

Initial

normal

Applies to

All elements.

Inherited

Yes.


line-height

Usage

Specifies the minimal height of each inline box.

CSS1 Values

normal | number | <length> | <percentage>

CSS2 Values

inherit

Initial

normal

Applies

to All elements.

Inherited

Yes.


text-align

Usage

Describes how a block of text is aligned.

CSS1 Values

left | right | center | justify

CSS2 Values

<string> | inherit

Initial

Depends on browser and writing direction.

Applies to

Block-level elements.

Inherited

Yes.


text-decoration

Usage

Describes decorations that are added to the text of an element.

CSS1 Values

none | underline | overline | line-through | blink

CSS2 Values

inherit

Initial

none

Applies to

All elements.

Inherited

No.


text-indent

Usage

Specifies the indentation of the first line of text in a block.

CSS1 Values

<length> | <percentage>

CSS2 Values

inherit

Initial

0

Applies to

Block-level elements.

Inherited

Yes.


text-shadow

Usage

Accepts a comma-separated list of shadow effects to be applied to the text of an element.

CSS2 Values

none | <color> | <length> | inherit

Initial

none

Applies to

All elements.

Inherited

No.

Notes

You also can use text shadows with :first-letter and :first-line pseudo-elements.


text-transform

Usage

Controls the capitalization of an element's text.

CSS1 Values

capitalize | uppercase | lowercase | none

CSS2 Values

inherit

Initial

none

Applies to

All elements.

Inherited

Yes.


vertical-align

Usage

Affects the vertical positioning of the boxes generated by an inline-level element.

Values

baseline | sub | super | top | texttop | middle | bottom | text-bottom | sub | <percentage>

CSS2 Values

inherit

Initial

baseline

Applies to

Inline-level and table-cell elements.

Inherited

No.


white-space

Usage

Specifies how white space inside the element is handled.

CSS1 Values

normal | pre | nowrap

CSS2 Values

inherit

Initial

normal

Applies to

Block-level elements.

Inherited

Yes.


word-spacing

Usage

Specifies the spacing behavior between words.

Values

normal | <length>

CSS2 Values

inherit

Initial

normal

Applies to

All elements.

Inherited

Yes.





Sams Teach Yourself Web Publishing with HTML and CSS in One Hour a Day
Sams Teach Yourself Web Publishing with HTML and CSS in One Hour a Day (5th Edition)
ISBN: 0672328860
EAN: 2147483647
Year: 2007
Pages: 305

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net