Better wrapping with text-wrap

Baseline 2024 Reference ↗

balance evens out short headings; pretty spends more work improving paragraph line breaks. Both are progressive typographic improvements.

h1, h2, h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}  

Use balance for a limited number of lines, not long body copy. Browsers may choose different wrapping because fonts and available space differ.