Re: "Soft" hyphens

Discussion in 'HTML' started by Jukka K. Korpela, Jun 24, 2003.

  1. wrote:

    > Is there a way to have "soft" hyphens or "soft" spaces in lines of
    > text, lines which may have to break, depending on the width
    > available? (By "soft" I mean a space or hyphen which disappears
    > when not needed.)


    This is a long story... the most comprehensive (ehem) discussion is
    probably at http://www.cs.tut.fi/~jkorpela/html/nobr.html

    > Example:
    > Line of text:
    > "informative/encouraging/discouraging/travelling/whatever"
    >
    > when what would be better is:
    > "informative/encouraging/discouraging/travelling/
    > whatever"


    You can put the nonstandard <wbr> tag after each slash. Should cause no
    harm, and mostly works (in the way you expect, it's normally invisible
    but indicates a potential line break point).

    But I would suggest the use of suitable _words_ instead of the hightly
    ambiguous slash character. (The slash can mean 'and', or
    'or alternatively', or 'alias', or 'with subtype', or 'per', or
    something else.)

    > The same with hyphens:
    > "informative/encouraging/encouraging undoubtedly existentialistic
    > antidisenstablishmentarianism"
    >
    > when what would be better would
    > "informing/encouraging/encouraging undoubtedly existentialistic
    > anti- disenstablishmentarianism"


    There's no way that would do it without causing serious problems when
    it does not work. The soft hyphen &shy; is supposed, by current HTML
    specifications, to act that way, and is supported by a considerable
    number of browsers, but do you really want your words be shown with
    normal hyphens "-" instead of the soft hyphen in a great many browsing
    situations? (In special cases it is, e.g. if a word can be spelled with
    or without a hyphen, by the rules of the language.)

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, Jun 24, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ibiza
    Replies:
    5
    Views:
    1,185
    S. Justin Gengo [MCP]
    Feb 9, 2006
  2. spaghetti

    Re: "Soft" hyphens

    spaghetti, Jun 24, 2003, in forum: HTML
    Replies:
    0
    Views:
    925
    spaghetti
    Jun 24, 2003
  3. Augustus

    Re: "Soft" hyphens

    Augustus, Jun 24, 2003, in forum: HTML
    Replies:
    4
    Views:
    899
    Anonymous Joe
    Jun 25, 2003
  4. James Harris
    Replies:
    46
    Views:
    1,035
    Ronald Landheer-Cieslak
    Jul 23, 2004
  5. ade0
    Replies:
    1
    Views:
    296
    Gunnar Hjalmarsson
    Apr 6, 2005
Loading...

Share This Page