Skip to content

Text & Characters

This family groups together all the properties that allow you to control text, its font, size, spacing, alignment, and decorations.


PropertyDescription
colorDefines the text color.
fontShorthand property grouping multiple values (font-style, font-variant, font-weight, font-size, line-height, font-family).
font-familyDefines the font family (e.g., Arial, Verdana, Times New Roman).
font-sizeDefines the font size (px, em, rem, %).
font-styleDefines the text style: normal, italic, oblique.
font-variantEnables small caps (small-caps).
font-weightDefines the font weight: normal, bold, 100 to 900.
letter-spacingDefines the spacing between letters.
line-heightDefines the line height (leading).
text-alignDefines horizontal alignment: left, right, center, justify.
text-decorationDefines text decorations: underline, overline, line-through.
text-overflowDefines how overflowing content is displayed: ellipsis adds ellipsis (…)
text-shadowDefines a shadow applied to the text.
text-transformDefines text transformation: uppercase, lowercase, capitalize.
vertical-alignDefines vertical alignment (baseline, top, middle, bottom).
white-spaceControls handling of spaces and line breaks: normal, nowrap, pre, pre-wrap.
word-breakDefines word breaking: normal, break-all, keep-all.
word-wrap / overflow-wrapForces line breaks if a word overflows.
word-spacingDefines spacing between words.
writing-modeDefines the writing mode: horizontal-tb, vertical-rl, vertical-lr.
directionDefines text direction: ltr (left → right), rtl (right → left).
unicode-bidiDefines bidirectional text behavior in combination with direction.

Some properties are tied to older browsers (Internet Explorer) or specific use cases (Asian languages). They are rarely used today.

PropertyStatusExplanation
font-size-adjustRarely usedAdjusts the height of lowercase letters independently of font-size.
font-stretchPoorly supportedDefines font stretching or compression (condensed, expanded).
line-breakSpecific to Asian languagesDefines line breaking rules in Japanese and Chinese.
text-align-lastInternet ExplorerDefines alignment of the last line specifically.
text-autospaceInternet ExplorerDefines automatic spacing for Asian characters.
text-kashida-spaceInternet ExplorerDefines justification specific to Arabic text.
text-underline-positionSpecific to Asian languagesDefines the underline position (useful for Japanese and Chinese).

  • The main properties cover font (font-family, font-size, font-weight, font-style),
    spacing (line-height, letter-spacing, word-spacing),
    and text formatting (text-align, text-transform, text-decoration).
  • Deprecated properties like text-autospace or text-kashida-space should no longer be used.
  • For Asian languages or Arabic, some specific properties (line-break, writing-mode, unicode-bidi) may still be useful.