---
title: "TIL — text-wrap balance for headings"
date: 2026-03-05
category: til
tags: ["css","typography"]
author: "Thomas Kokholm"
url: https://thko.pages.dev/blog/2026/til-css-text-balance/
---

# TIL — text-wrap balance for headings

Long headings often break with a single lonely word on the last line. One CSS
declaration fixes it:

```css
h1 {
  text-wrap: balance;
}
```

The browser evens out the line lengths for short blocks of text. It is meant for
headings and other small text blocks, not for body copy.
