CSS Text Styles
CSS
CSS Text Styling CSS allows you to style and control how text appears on your webpage. Below are the most commonly used properties:
1. Font Family (font-family)
- Sets the typeface (font) of the text.
- Always provide fallback fonts.
2. Font Size (font-size)
- Controls how big or small the text is.
- Units:
px
,em
,rem
,%
, etc.
3. Font Weight (font-weight)
- Sets the thickness/boldness of text.
4. Font Style (font-style)
- Makes text italic, normal, or oblique.
5. Line Height (line-height)
- Controls vertical spacing between lines of text.
6. Text Alignment (text-align)
- Aligns text inside its container.
7. Text Color (color)
- Sets the color of the text.
8. Text Decoration (text-decoration)
- Used for underlining, removing underlines, etc.
9. Text Transform (text-transform)
- Changes the case of letters.