ToC ~ Up ~ Prev ~ Next ~ Index Introduction to HTML
Last Update: 5 January 1998

7.12 NOBR and WBR Elements

NOBR marks a block of text that should not contain line breaks -- line breaks are forbidden, an the text will be presented as a single line, without any word wrapping. This is useful for text that you do not wish broken at word spaces, regardless of the page layout.

You can use WBR elements inside NOBR to allow for optional word breaks. Inside NOBR, a WNR marks a place where line breaking is allowed. WBR is thus lie a conditional BR element, in that it does not force a line break, but instead permits one where a break would otherwise be forbidden.

HEre is an example of the use of WBR and NOBR

   <NOBR>
   Therea are no line breaks in this line, even though
   it is incredibly long and tedious. This probably goes
   right of the end of the display, only to be
   broken by this lonely <WBR> element, sitting
   alone, near the end of the line.
   </NOBR>

which is displayed as (between the two horizontal rules):


Therea are no line breaks in this line, even though it is incredibly long and tedious. This probably goes right of the end of the display, only to be broken by this lonely element, sitting alone, near the end of the line.

ToC ~ Up ~ Prev ~ Next ~ Index Introduction to HTML
© 1994-1998 by Ian Graham
Last Update: 5 January 1998