Overflow

When text does not fit, clip it, break words or reshape the lines:

Balanced headings, ellipsis, emergency word breaks and line clampingHTMLLive
<style>
  body { font: 16px/1.4 system-ui; display: flex; flex-wrap: wrap; align-items: start; gap: 8px; }
  div, h3 { border: 1px solid #90a4ae; padding: 4px; margin: 0; font-size: 16px; }
  h3 { width: 240px; }  .b { text-wrap: balance; }  .brk { overflow-wrap: anywhere; width: 9em; }
  .ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 285px; }
  .cl { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
</style>
<h3>Balanced wrapping evens out headings</h3><h3 class="b">Balanced wrapping evens out headings</h3>
<div class="ell">https://example.com/a/very/long/address/that/never/fits.html</div>
<div class="brk">Pneumonoultramicroscopic</div>
<div class="cl" style="width: 440px; overflow: hidden">Line clamping cuts this card description
  after two lines, however much text the content management system sends, with an ellipsis.</div>
Browser output of Listing 4.36
Browser output of 36