On this page
text-wrap
Prev: `line-height` | Up: typography | Next: `color`
Rel: typography, Typography & Color Guide
Ref: MDN Web Docs — text-wrap
Tags: #public #web #css #properties #typography #tier/standard
Syntax & Overview
text-wrap: balance | pretty | nowrap;
Controls typographic line-breaking quality.
- Initial:
wrap| Inherited: Yes | Animatable: No
Notes & Best Practices
text-wrap: balancefor short headings (even line lengths, capped around 6 lines) andtext-wrap: prettyfor body paragraphs (prevents single-word orphans).
Example
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }
Linked from
Related notes
- tuts/css/properties/typography/color Linked here; links to this page; shared tags: #css, #properties, #tier, #typography, #web
- tuts/css/properties/typography/line-height Linked here; links to this page; shared tags: #css, #properties, #tier, #typography, #web
- tuts/css/properties/typography Linked here; links to this page; shared tags: #css, #properties, #typography, #web
- tuts/css/properties/typography_and_color Linked here; shared tags: #css, #properties, #typography, #web
- tuts/css/properties/typography/accent-color shared tags: #css, #properties, #tier, #typography, #web
- tuts/css/properties/typography/color-scheme shared tags: #css, #properties, #tier, #typography, #web
- tuts/css/properties/typography/font-family shared tags: #css, #properties, #tier, #typography, #web
- tuts/css/properties/typography/font-size shared tags: #css, #properties, #tier, #typography, #web
- tuts/css/properties/box_model/aspect-ratio shared tags: #css, #properties, #tier, #web
- tuts/css/properties/box_model/box-sizing shared tags: #css, #properties, #tier, #web