CSS Rules for Text -Selector {property:value} |
| Web designers have more control of the display of text with Cascading Style Sheets.
|
| text-indent: | Defines the length of the indent of the first line of textAny valid length.- pixels, centimeters, inches, percent, p{text-indent: 40px}
|
| text-align: | Defines the text alignment. - left, center,right or justifyp {text-align:center} |
| text-decoration: | Defines decorations added to the text - none(default),
underline, overline, line-through or blinkh1{text-decoration:overline}
|
| text-transform: | Defines capitalization of text- none (default),capitalize -Capitalizes the first letter;
uppercase - Capitalizes all letters,
lowercase- All text to lowercaseh1{text-transform:uppercase} |
| letter-spacing: | Defines space between text characters- normal (default) Any valid length h2{letter-spacing: 0.4em} |
| word-spacing: | Defines the whitespace between words
normal (default), any valid length p {word-spacing:1.3em} *Em-unit of measurement equal to the current type size; width of uppercase M.
|
| line-height: | Defines the space between lines of text. normal (default) same as the font size h2{line-height: 14pt} |
| text-shadow: | Defines values to create a text shadow effect. Several values must be included separated by commas. Not supported by all browsers. Use positioning to for text shawdow.
|
| white-space: | States whether text will wrap around to the next line td {white-space:nowrap}
|
| vertical-align | Align vertically: super, sub, baseline, middle, bottom, text-top
|