CSS Text Styling

CSS provides many properties to style and format text on your webpage. Here are the main text styling options:

Color

Change the color of text using color:

This text is red. color: red;

Alignment

Align text with text-align:

This text is centered. text-align: center;

Text Transformation

Transform text case with text-transform:

This text is uppercase. text-transform: uppercase;

Text Decoration

Add lines or effects with text-decoration:

This text is underlined. text-decoration: underline;

Letter & Word Spacing

Adjust spacing between letters and words:

Spaced text. letter-spacing: 3px; word-spacing: 10px;

Text Indent

Indent the first line of text with text-indent:

This text is indented. text-indent: 30px;

White Space & Wrapping

Control how text wraps with white-space:

This text will not wrap to the next line. white-space: nowrap;