CSS Text and Font Style Properties
The heart of CSS styling lies in the text and style properties, which give you an incredible amount of control over the appearance of Web page text.
color
Usage | Sets the color of text. | Values | color. |
direction
Usage | Sets the direction of text, as in left-to-right or right-to-left. | Values | ltr, rtl. |
font
Usage | A shorthand property that allows you to set all the font properties in one declaration. | Values | font-style, font-variant, font-weight, font-size/line-height, font-family. |
font-family
Usage | A prioritized list of font family names and/or generic family names for an element. | Values | family-name, generic-family. |
font-size
Usage | Sets the size of a font. | Values | xx-small, x-small, small, medium, large, x-large, xx-large, smaller, larger, length, %. |
font-style
Usage | Sets the style of the font. | Values | normal, italic, oblique. |
font-variant
Usage | Displays text in a small-caps font or a normal font. | Values | normal, small-caps. |
font-weight
Usage | Sets the weight (boldness) of a font. | Values | normal, bold, bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800, 900. |
letter-spacing
Usage | Increase or decrease the space between characters of text. | Values | normal, length. |
text-align
Usage | Aligns the text within an element. | Values | left, right, center, justify. |
text-decoration
Usage | Applies a decoration to text. | Values | none, underline, overline, line-through, blink. |
text-indent
Usage | Indents the first line of text in an element. | Values | length, %. |
text-TRansform
Usage | Controls the capitalization of letters of text. | Values | none, capitalize, uppercase, lowercase. |
white-space
Usage | Establishes the handling of white space within an element. | Values | normal, pre, nowrap. |
word-spacing
Usage | Increases or decreases the space between words. | Values | normal, length. |
|