How to Fix
Widow Words?

by Eric Fortis
orphan widow html

Widows are the lone words on the last line of a paragraph. More than improving aesthetics, fixing them could help with readability. For example, instructions are easier to follow when they don't break, such as FileSave to Disk.

Similarly, to keep multi-word names together, such as Uxtely LLC.

Option A: HTML Entity

Use a non-breaking space.

<p>Lorem ipsum dolor sit&nbsp;amet.</p>

By the same token, there's a non-breaking hypen (‑) &#8209;

Option B: CSS Class

.no_wrap { white-space: nowrap }

<p>Lorem ipsum dolor <span class="no_wrap">sit amet.</span></p>

Sponsored by: