Understanding HTML Colors
Learn how to use colors in HTML
CSS Text
Introduction to CSS Text
CSS text properties allow you to style and position text within an element. They include alignment, decoration, transformation, and spacing options.
CSS Text Properties
- text-align: Aligns text within an element (e.g., left, center, right).
- text-decoration: Adds decorative lines like underline, overline, and line-through.
- text-transform: Controls text case (e.g., uppercase, lowercase, capitalize).
- line-height: Sets the spacing between lines of text.
- letter-spacing: Controls space between characters.
Example
p {
text-align: center;
text-transform: uppercase;
line-height: 1.5;
letter-spacing: 2px;
}
Browser Support
All major browsers support these text properties.