CSS
June 3, 2026 2 min read

CSS Text Properties: Color, Alignment, Decoration, and More

HS
HEMANT SINGH
Technical Writer & Educator
colorDefine text colorcolor value can be used in different ways
  • with color name
  • with hexadecimal value
  • with rgb value
  • with rgba value
text-alignHorizontal alignment of text
leftLeft alignment
rightRight alignment
centerCenter alignment
justifyJustify alignment
directionDirection of text
ltrDirection from left to right
rtlDirection from right to left
text-decorationText decoration
noneNo decoration
underlineLine under text
overlineLine over text
line-throughThrogh a line from text
text-transformDefine capitalization of text.
lowercaseDisplay text in lowercase
uppercaseDisplay text in uppercase
capitalizeFirst letter of each word in capital letter
text-indentSet indentation of first line in a text block
line-heightSet line height of a text
letter-spacingSpace between letters
word-spacingSpace between words
white-spaceHandle space of text block
normalNormal flow of text
preWhite space will preserved in a text block
nowrapText will not wrap in a text block
text-shadowSpecify text shadow