The soft hyphen.

Typography on the web is gradually improving, thanks to the slow march forward for CSS. Though anybody moving from print to web will still be baffled by how limited that the support is for many basic layout elements, we veterans see only how far we’ve come.

A particularly vexing problem for me has been wrapping long lines. Once upon a time, there was a <WBR> tag (back when we capitalized tags), which indicated where a particularly long word could optionally break, should the line need to wrap in the middle of it. But that tag was depreciated, leaving us high and dry.

There’s a solution. Kind of. I’ve just now discovered the &shy; entity, which stands for “soft hyphen.” Though it’s much debated, it makes it possible to, in many browsers, specify a location in a word at which it can break, if necessary for a line wrap.

It’s a small thing, but this kind of progress really makes my life simpler.

Published by Waldo Jaquith

Waldo Jaquith (JAKE-with) is an open government technologist who lives near Char­lottes­­ville, VA, USA. more »

6 replies on “The soft hyphen.”

  1. Explain me a situation where I would use a hyphen — Other than hilariously-hyphenated-joke-sentances? With so many variables to deal with on the web — screen resolution, browser size, browser font size — can you ever get text in a concrete definite position where you know which words need to be hyphenated?

    I guess if you have a tendency to use large words a lot ; )

    Anyway good to know.

  2. I’ve mostly encountered this on website sidebars. When you’re dealing with a 200px ribbon, a 10-letter word ends up on its own line, leaving an orphaned preposition on the line above it. It looks bad.

  3. Yeah I see that I suppose. But you are going to have the same problem when grandma mom comes along with her font size set to “Largest,” except six letter words won’t fit.

    Stupid old people ; )

  4. I did, yeah — I’ve been playing around with typography a bit. I hate that this site is so ugly and uninteresting, so I periodically make some stupid little change, like the font, so that I’ll feel better about it. :)

  5. This is why I need to start reading you more often … I miss the notices of these little thinks that make life easier …

Comments are closed.