|
Text properties control text alignment, spacing and formatting such as underline and case. They affect how the browsers displays letters, spaces, words, and paragraphs. In standard HTML, alignment wasn’t very consistent. You had the <center> tag and you could use the align attribute on some tags but not on others. The text-align property improves things because it lets you align the text in any tag to the left, right, or centre. If you are lucky, you might even get justified text. In theory, the vertical-align property lets you set the vertical alignment for the tag but it doesn’t work properly. The text-decoration property gives you decorative text. You can underline, overline, strike-through and (if you use Netscape) blink text. Not much new there: you could do most of this with tags like <u> and <strike>. CSS2 now gives you some extra effects:
You also have more control over how the browser spaces text. Use the letter-spacing property to set the amount of white space between letters, the line-height property to set for leading (the distance between the baselines of two lines of text), and the word-spacing property to add or decrease space between words. The whitespace property tells the browser how to handle multiple spaces. |
More information Text formatting |