Forum digitalis

2.3 Text and content

Variants

With CSS, the appearance of text and fonts can be precisely controlled. font-family sets the font type, font-size the size, and font-weight the weight (e.g., normal, bold). line-height controls the line spacing, text-align the alignment. text-decoration can add underlines or strikethroughs. white-space controls how spaces and line breaks are handled.

p { font-family: Arial, sans-serif; /* Font type */ font-size: 16px; /* Font size */ font-weight: bold; /* Font weight */ line-height: 1.5; /* Line height */ text-align: center; /* Text alignment */ text-decoration: underline; /* Underline */ white-space: nowrap; /* No line breaks */ }