Hard hyphen and HTML validation
Stacy Pober
stacy.pober at manhattan.edu
Tue Oct 29 19:18:43 EST 2002
Oops, correcting myself here. I misspoke: the line doesn't
break at an & character. It breaks only with the hyphen or
the numeric character entity for the hyphen.
As for substituting & for an ampersand, I doubt that would
make me too happy. It will make my pages validate without
warnings, but it would also break a number of important links.
For example, the link to our online catalog is:
http://www.waldo.msus.edu/cgi-bin/pals-cgi?palsAction=newSearch&setWeb=MCLCAT
On of our silverplatter databases is:
http://webspirs.silverplatter.com:8000/waldo?sp.form.first.p=srchmain.htm&sp.dbid.p=S(WN)
and America: History and Life is:
http://serials.abc-clio.com/cgi-bin/nph-AppStart.py2.1?_appname=v3&initialdb=AH
We cannot substitute & for THOSE ampersands.
So...as far as I can tell, any pages with those URLs are doomed to
be 'invalid' as far as most validation services are concerned.
Best,
Stacy
Stacy Pober wrote:
>
> I knew the character validates as &
>
> However...
>
> The problem is Internet Explorer feels it's proper to do a 'line
> break' at a hyphen or & character if the line length works out
> just right.
>
> For example, if IE sees that the line length is up, it will break
> AFL-CIO
> into:
> AFL-
> CIO
>
> I'm doing a simple text menu. The menu has with short one or
> two word links. One of the links is a relatively short hyphenated
> word. I don't want the browser to break that one word onto two
> lines. I'm currently using the <nobr> html tag for this, and, while
> it causes validation errors, it works okay for all the browsers I've
> tried.
>
> I know there must be all kinds of interesting ways to do menus that
> would get around this, but I don't want to do fancy stuff for this
> particular 'horizontal menu' of links. It's for a simple,
> low-graphics site and I would prefer that it display with reasonable
> consistency in everything from v.3 browsers on up.
>
> I just want this one hyphenated word to stay on ONE line.
>
> Someone privately wrote to suggest using a style sheet for this:
>
> <span style="white-space:nowrap;">Haagen-Dazs</span>
>
> I'm considering doing that, but I'm curious which browsers it
> will NOT work in.
>
> Thanks,
> Stacy
>
> Robert Sullivan wrote:
> > > OTOH, I probably shouldn't worry too much about those validation
> > > errors. I have come to the realization that some of our pages
> > > will *always* produce coding errors because of ampersands or
> > > other unusual characters that are a part of some of our database
> > > URL's.
> >
> > Actually, if you convert & to & they validate properly. (Thanks to
> > Web4Lib for informing me of this.)
> >
> > Bob Sullivan
> > Schenectady County Public Library (NY) <http://www.scpl.org>
--
Stacy Pober
Information Alchemist
Manhattan College Libraries
Riverdale, NY 10471
http://www.manhattan.edu/library/
More information about the Web4lib
mailing list