OT: <nobr> on a standards page?

  • Thread starter Thread starter Murray
  • Start date Start date
Why shouldn't it render as designed, since the browser(s) understand and honor the nobr tag?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
Heh - wrong forum....

--
Murray
============

Thomas A. Rowe said:
Why shouldn't it render as designed, since the browser(s) understand and
honor the nobr tag?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
I was wondering since it does in fact display properly for the code used.
<g>

--
Cheryl D. Wise
MS FrontPage MVP
Certified Professional Web Developer
Online instructor led training in FrontPage, Web Accessibility & Illustrator
Special Offer for Hurricane Relief when you register for our October
Session - See http://starttoweb.com
 
I know - that's what's troubling me. It's invalid HTML that just happens to
be supported everywhere, even on a standards compliant page.

Consider this markup -

<table height="100%"

which is also invalid HTML, and is *not* supported on a standards compliant
page. <shrug> I dunno....
 
The nobr markup
It seems that in general the only cure is to use the nonstandard,
Netscape-invented (!) nobr markup. It has never been adequately defined, and
browsers generally treat it in a command-like fashion: <nobr> is taken as
"disallow line breaks from now on" and </nobr> says "line breaks allowed
from now on". But it is safest to use it as text-level markup only. This
should suffice, since we normally would use nobr for short pieces of text
only, as in <nobr>vis-a-vis</nobr> or <nobr>-a</nobr>.

A very short quotation using guillemets could be put into a single nobr
element. But generally the approach of making a quotation as a whole
non-breakable is not suitable. Instead, you can put just the initial
guillemet and the first word inside nobr markup, like this:
<nobr>»wie</nobr> hier«

Assuming that future browsers will continue supporting nobr for preventing
line breaks, which is rather probable, it will assumably prevent hyphenation
too. So if you now use, say, the markup <nobr>»Anführungszeichen«</nobr>,
then browsers will really treat it as non-breakable even when they have
become intelligent enough to apply hyphenation to words.



T
|I know - that's what's troubling me. It's invalid HTML that just happens
to
| be supported everywhere, even on a standards compliant page.
|
| Consider this markup -
|
| <table height="100%"
|
| which is also invalid HTML, and is *not* supported on a standards
compliant
| page. <shrug> I dunno....
|
| --
| Murray
| ============
|
| "Cheryl D Wise" <wiserways.wiserways.com> wrote in message
| | >I was wondering since it does in fact display properly for the code used.
| ><g>
| >
| > --
| > Cheryl D. Wise
| > MS FrontPage MVP
| > Certified Professional Web Developer
| > Online instructor led training in FrontPage, Web Accessibility &
| > Illustrator
| > Special Offer for Hurricane Relief when you register for our October
| > Session - See http://starttoweb.com
| >
| > | >> Folks:
| >>
| >> Why does this page render properly?
| >>
| >> http://www.murraytestsite.com/nobrtest.html
| >>
| >> --
| >> Murray
| >> ============
| >>
| >>
| >
| >
|
|
 
IMO, the <nobr> tag is required, invalid HTML or not.
IE5 and earlier do not support the {white-space:nowrap} style, and Opera
8.5, IE 6 and earlier (have not checked IE7) treat the hyphen as a soft
hyphen, allowing lines of text to wrap. The hyphen should not allow
wrapping of text (as implemented in FireFox and Netscape browsers).
AFAICS, the <nobr> tag is the only viable cross-browser, inline method of
preventing a line of text containing hyphens from wrapping. There is the
<pre> tag, but that is a block tag, not inline.
 
Back
Top