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: #e74c3c;

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 wavy #6fa8dc;

Text Shadow

Add shadow to text with text-shadow:

This text has a shadow. text-shadow: 2px 2px 6px #b6c8f9;

Letter & Word Spacing

Adjust spacing between letters and words:

Spaced text. letter-spacing: 4px; word-spacing: 16px;

Text Indent

Indent the first line of text with text-indent:

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

White Space & Wrapping

Control how text wraps with white-space:

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