w1coding.comAll tutorials

CSS Texts

CSS lessons
  1. Environment Setup
  2. Introduction
  3. Tdisplay
  4. Basics
  5. Editors
  6. Syntax
  7. Colors
  8. Background
  9. Borders
  10. Margins
  11. Padding
  12. Width And Height
  13. Outline
  14. Texts
  15. Fonts
  16. Icons
  17. Links
  18. Lists
  19. Display
  20. Tables
  21. Max And With
  22. Positon
  23. Z Index
  24. Dropdown
  25. Overflow
  26. Float
  27. Navigation
  28. Image Sprites

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.