[thelist] Non-breaking "-" (dash)

Francois Jordaan francois.jordaan at wheel.co.uk
Mon Apr 8 05:50:00 CDT 2002


Hugh Blair wrote,
> OK - I'm lost. Isn't there an escape sequence for a
> non-breaking dash? "-"  Or have I just dreamed this
> one up?

Do you mean a non-breaking hyphen? Quoting from
http://alistapart.com/stories/emen/

"Three other hyphen characters exist in Unicode, but are unfortunately not
defined in the HTML entity set (although they should be):
1. The non-breaking hyphen (‑ not in HTML) does just what its name
implies."

For example, if I wanted to ensure "font-weight" is treated by the browser
as a single word, and never wraps like "font-
weight", then I'd use a non-breaking hyphen. Unfortunately, it seems, we
can't rely on this happening.

More useful IMO is the soft hyphen. Then, to make a narrow column of text
less ragged, I could put soft hyphens in long words. According to the same
article, again, not all browsers honour it. I'm quite curious as to which
ones do.

francois
www.fjordaan.uklinux.net

_____________________________________________________________________
This message has been checked for all known viruses by UUNET delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.uk.uu.net/products/security/virus/



More information about the thelist mailing list