Property: |
text-align |
Values: |
left, right, center, justify |
Initial: |
UA specific |
Inherited: |
yes |
This property describes how text is aligned within the element. The actual
justification algorithm used is UA and human language dependent.
Example:
DIV.center { text-align: center }
Since 'text-align' inherits, all block-level elements inside the 'DIV'
element with 'CLASS=center' will be centered. Note that alignments are relative
to the width of the element, not the canvas. If 'justify' is not supported, the
UA will supply a replacement. Typically, this will be 'left' for western
languages.
CSS1 core: UAs may treat 'justify' as 'left' or 'right', depending
on whether the element's default writing direction is left-to-right or
right-to-left, respectively.
Property: |
text-decoration |
Values: |
none, underline, overline, line-through, blink |
Initial: |
none |
Inherited: |
no, but see clarification below |
This property describes decorations that are added to the text of an element.
If the element has no text (e.g. the 'IMG' element in HTML) or is an empty
element (e.g. '<EM></EM>'), this property has no effect. A value of 'blink'
causes the text to blink.
The color(s) required for the text decoration should be derived from the
'color' property value.
This property is not inherited, but elements should match their parent. E.g.,
if an element is underlined, the line should span the child elements. The color
of the underlining will remain the same even if descendant elements have
different 'color' values.
A:link, A:visited, A:active { text-decoration: underline }
The example above would underline the text of all links (i.e., all 'A'
elements with a 'HREF' attribute).
UAs must recognize the keyword 'blink', but are not required to support the
blink effect.
Property: |
text-indent |
Values: |
<length>, <percentage> |
Initial: |
0 |
Inherited: |
yes |
The property specifies the indentation that appears before the first
formatted line. The value of 'text-indent' may be negative, but there may be
implementation-specific limits. An indentation is not inserted in the middle of
an element that was broken by another (such as 'BR' in HTML).
Example:
P { text-indent: 3em }
Property: |
text-transform |
Values: |
capitalize, uppercase, lowercase, none |
Initial: |
none |
Inherited: |
yes |
- 'capitalize'
- uppercases the first character of each word
- 'uppercase'
- uppercases all letters of the element
- 'lowercase'
- lowercases all letters of the element
- 'none'
- neutralizes inherited value.
The actual transformation in each case is human language dependent.
H1 { text-transform: uppercase }
The example above would put 'H1' elements in uppercase text.
|