Jens Oliver Meiert

Use my latest work: latest tech book · latest non-tech book · latest optimization tool · latest defense tool

Word Division: On “word-break,” Soft Hyphens, and Zero-Width Spaces

Published on Feb 8, 2007 (updated Aug 17, 2024), filed under , , . (Share this post, e.g., on Mastodon.)

This post is outdated. (Consider hyphens!)

Word breaks and hyphenation are sometimes a problem when it comes to little available space but long words: The longer the word and the less space available, the more a layout is at risk. English appears to be less affected than other languages (I suspect Finnish and also German to be good examples for use of overly long words), but every once in a while a developer looks for ways to “automatically” break words.

Let’s take a look at possible solutions (example page).

word-break

word-break is a formerly proprietary property introduced by Microsoft (who don’t care much about vendor-specific extensions), which meanwhile has been included in CSS 3.

Though word-break sounds quite promising, I understand the specification that it does not demand from implementations to really take into account grammar, but to rather provide word breaking on a per-letter basis. That’s how it works now when you try break-all (see example), as long as you test with Internet Explorer which supports parts of this formerly unstandardized property.

Since this is just a little round-up, I will state that word-break

Soft Hyphen

The soft hyphen—from Unicode’s C1 Controls and Latin-1 Supplement (PDF)—is usually injected via ­ or ­, respectively. Skipping Jukka Korpela’s former article on SHY, we must note that it

Zero-Width Space

Zero-width spaces—see Unicode’s General Punctuation chart (PDF)—are used the same way as soft hyphens, namely by placing ​ entity references in your HTML. So what’s to note when you bank on zero-width spaces?

You’re probably as wise as before, but beside correcting me on details (other nifty Unicode characters?) of this hastily written post please take another look at the aforementioned test page.

Update (July 9, 2007)

Breaking: The soft hyphen has been fixed in the Gecko core.

About Me

Jens Oliver Meiert, on March 2, 2026.

I’m Jens (long: Jens Oliver Meiert), and I’m an engineering lead, guerrilla philosopher, and indie publisher. I’ve worked as a technical lead and engineering manager at various companies (e.g., Google); I’m an active web and tool developer (code optimization, digital defense), a contributor to web standards (like HTML, CSS, WCAG), and a book author (O’Reilly, Frontend Dogma).

I love trying things—in web development and engineering management, but also in politics and philosophy, where I hold to one idea in particular: that we can only be well if we take good care of everyone. Here on meiert.com I talk about some of my perspectives and experiences. (Interpret charitably but be critical—and share feedback and advice that makes my work better.)