Rise Layouts logo Rise LayoutsDesign and layout, explained clearly
Typography

Widows and Orphans in Typography and How to Fix Them

A client sent back a landing page mockup last spring with one comment on it: the headline looks broken. It was not broken.

A laptop screen showing a large headline where the last word has wrapped onto its own line

A client sent back a landing page mockup last spring with one comment on it: the headline looks broken. It was not broken. The headline was five words long and the fifth word had wrapped onto its own line, sitting there alone under four words of 44 pixel type. Nobody on the team had noticed in Figma, because in Figma the text box was 60 pixels wider than the one the browser gave it.

That single dangling word is the most common typographic fault on the web, and it is almost never caught in design, because designers test at the widths they chose. It has a name, or rather two names that half the profession uses interchangeably, which is part of why it goes unfixed.

Which one is which

Both terms come from print composition and both describe a line that has lost its company.

A widow is a short final line left at the end of a paragraph, most visibly a single word sitting alone. The traditional memory aid is that a widow is left behind at the end, which also means she gets pushed to the bottom.

An orphan is the opposite position: the first line of a paragraph stranded alone at the bottom of a page or column, with the rest of the paragraph carrying on overleaf. An orphan has no family above it. Some typesetting manuals swap these two definitions outright, and InDesign sidesteps the argument by calling the controls keep options and counting lines instead.

On the web the second case barely exists, because pages scroll rather than break. What we deal with almost exclusively is the widow: the stray word at the end of a heading, a button label, a card title or a pull quote. For clarity I would keep the print terms for print and simply call the web problem a bad wrap, because that is what you will be fixing.

Where it hurts and where nobody notices

The size of the problem scales with the size of the type and the shortness of the text, and that combination is worth internalising because it tells you where to spend your effort.

In 48 pixel display type across five words, a stray final word is roughly a fifth of the content sitting on its own line. The eye reads it as a mistake, and the gap it leaves above the next element throws out the vertical spacing you built deliberately. In 17 pixel body text in a paragraph of nine lines, the same stray word is about two percent of the block and genuinely nobody cares. I have watched a designer spend forty minutes hand tuning body paragraphs that no reader will ever see, while a broken headline shipped on the same page.

So the places to look, roughly in order of how much damage a bad wrap does: page headlines and hero text, section headings, card titles in a grid, button and tab labels, pull quotes, image captions, and table headers. Body copy comes last and usually does not need touching at all.

Card grids deserve a special mention. A row of three cards where one title wraps to three lines and the others wrap to two creates uneven card heights or uneven internal spacing, and the inconsistency reads as sloppiness even to people who cannot name the cause. If you have ever wondered why a grid feels slightly wrong while every measurement checks out, count the lines in the titles.

The counter-take: do not reach for the CSS properties

Search this problem and you will be told to set the widows and orphans properties in CSS. There are two properties with exactly those names, and I think using them on a normal web page is close to pointless.

They only apply to fragmented contexts: paged media, print stylesheets, and multi column layouts. On a standard scrolling page there are no page breaks for them to act on, so declaring them does nothing at all. They are genuinely useful in a print stylesheet, and if you produce invoices or reports as PDF from HTML, set both to 2 or 3 and you will stop single lines stranding across pages. For everything else they are cargo.

The second piece of advice I would push back on is the manual fix as a default habit. Dropping a non breaking space between the last two words of every heading works, and it is the right tool for one hero headline you control. Applied across a site, it ages badly. Someone edits the copy in the CMS, the entity gets stripped or doubled, the heading is now two words longer, and the non breaking space you placed is holding together the wrong pair. I have inherited a site with 60 of them, a quarter of which were actively making wraps worse.

Use the manual fix surgically. Use layout and the newer CSS for everything systematic.

Fixes that hold up

In the order I try them.

  1. Shorten the text. Unglamorous and usually correct. A five word headline that wraps badly at 390 pixels is often a four word headline waiting to happen, and the four word version is better copy. This is the fix I suggest first and the one clients resist most.
  2. Set text-wrap: balance on headings. This tells the browser to even out the line lengths across a short block instead of filling each line greedily. It is made for exactly this problem and it is supported across current Chrome, Safari, Firefox and Edge. Browsers cap it at a handful of lines, commonly six, so apply it to headings and card titles rather than paragraphs.
  3. Set text-wrap: pretty on body copy. This is the body text counterpart. It tells the browser to avoid leaving a very short last line and to improve the rag generally, at a small performance cost. Support is newer and thinner than balance, so treat it as an enhancement that degrades silently.
  4. Constrain the measure. Many bad wraps are really a line length problem in disguise. A heading that spans 900 pixels will wrap in places you cannot predict, and capping it at around 20 to 30 characters per line for display sizes gives the browser far fewer chances to embarrass you. Our piece on how line length decides whether people keep reading covers the measure for body text, and the logic runs the same way upward.
  5. Insert a non breaking space, once, by hand. Between the last two words only, written as   in the markup, and only on text that will not be edited by anyone else. Keep a note of where you did it.

What I would not do is reach for a JavaScript widow fixer. Those scripts run after the text has painted, so you get a visible reflow, and they add a dependency to solve something two CSS declarations now handle.

Checking your work at the widths that matter

Bad wraps are a testing failure more than a design failure. Three widths catch nearly everything: 390 pixels for a common phone, around 768 for a tablet in portrait, and the width where your container stops growing. The last one is the sneaky one, because between your maximum container width and the viewport there is a range where nothing changes except the text, and that is exactly where a heading flips from two lines to three.

Build the check into your handoff. When I review a page now I drag the window slowly from 1400 pixels down to 320 and watch only the headings. It takes ninety seconds and it finds things that no static screenshot will. Anything that looks wrong at a width a real person might use is worth fixing, and anything that only breaks at 283 pixels is not.

One more small habit worth adopting: write your headings in the browser, or at least check them there, before you sign off the design. Figma renders type with its own metrics and its own text box, and the gap between that and the browser is where most stray words are born. If your type sits in a system where everything else lines up, as in a well set type scale, a single wrapped word is the detail that will still make the page look accidental.

FAQ

Is a single word on the last line always a mistake?

No. In long body paragraphs it is normal and invisible. It becomes a mistake when the type is large or the block is short, which is why headings and card titles need the attention.

Does text-wrap: balance work everywhere?

It works in current versions of the major browsers and is ignored safely in older ones, so the worst case is the wrap you already have. Browsers limit how many lines it will balance, so keep it off long paragraphs.

Do the CSS widows and orphans properties ever help?

Yes, in print stylesheets and in multi column layouts, where real breaks exist. On an ordinary scrolling page they have nothing to act on.

What about justified text, does it make this worse?

It changes the symptom. Justification hides the ragged edge but produces uneven word spacing and rivers instead, which is one of several reasons we argue for left aligned text in justified text and why left aligned usually wins.

MV
Mara Vinter

Mara writes about the principles behind good layout, aimed at people who want their work to look intentional rather than accidental.

More posts by Mara

More in Typography

01doorganico 084goad 3hot8 4465456 after5internprogram ahandfulofblessings ahmadpc ahomcybersecurity allodialresources annodex antiquesandperiodcollectibles aotc asianworldkashmir beedlectrics bloggertemplatefree bluefeatheragency bodyweightsolution campaign08blog carfixadvisor catstreetcollective cbstvsports cnfanspurchasing committeeof500yearsofdignityandresistance covertopsdjs cs-kaiyuangame cuestacomunicaciontotal cxoutlet dancebetgame deskgearhub destinyvillastay detectmagazine di33 diamondsteelbuildings donmo dyanadropship emarsysfinance emimattl escapechan eskitarih evautoplay everythingweddings-orlando farmzone feedviewerapp foxstudiosscratch gamevui123 gleasongrade greetingsday hacklabasu haskell iw-kaiyun jagoanproperti jilidskripsi joltbusinessfinance juegodepokergratis juegospucca kaeru-festival latestmehndidesigns lestanzediottaviano litemagazines localcommunityhero lustrsazan mariashebets menswheels newwebstechs1 nikkit ootheday oxigenvpn plurfitness prefetial probudgetcarpetcleaning psychicmrsmartin pyaten qvantor rejoignezlogis rexzbot ruchin rwxqsgd5 sakaltime shibiaowang shop-bot skrtips spotlesshaven strcoding tetapatrium topselller uneplanteartificielle vipertechcr webtech1223411 wo-kygaming yamaha-mekar yeknava yoybuysheets zenunwa yamaha-mekar jilidskripsi ankertoto ankertoto ankertoto