W3C home > Mailing lists > Public > www-validator@w3.org > August 2006

Re: Validator complains about <nobr>

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Tue, 22 Aug 2006 19:31:52 +0300 (EEST)
To: OOzy Pal <oozypal@gmail.com>
cc: www-validator@w3.org
Message-ID: <Pine.GSO.4.64.0608221927170.17833@korppi.cs.tut.fi>

On Tue, 22 Aug 2006, OOzy Pal wrote:

> Error  Line 156 column 11: element "nobr" undefined.
>
>     <nobr>Folder</nobr>

In addition to other responses you've got, I'd like to point out that 
usage like the above is pragmatically pointless: current browsers don't do 
word division, so they won't break the word "Folder" even if you omit the 
<nobr> markup. It would be a different matter if the text contains a space 
(but then &nbsp; is usually a better approach: use foo&nbsp;bar instead of 
<nobr>foo bar</nobr>) or a hyphen (e.g., <nobr>foo-bar</nobr> is really 
the only practical way to prevent browser from breaking the text into
"foo-" on one line and "bar" on the next one).

If you wish to use <nobr> and still use a validator, you might consider 
using a validator that can deal with "extended DTDs", such as the 
www.htmlhelp.com validator. For more info on this, see
http://www.cs.tut.fi/~jkorpela/html/nobr.html#valid

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Tuesday, 22 August 2006 16:31:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:22 GMT