NOBR tag CSS alternative/analog


Sometimes it is necessary to put series of non-breaking spaces between words, to ensure that browser will not break line. Using multiple &nbsp; (non-breaking space entity) is quite messy and <NOBR> from older versions of HTML is not defined in XHTML standard. This articles tells about CSS property which can substitute <NOBR> tag


  • CSS 2 and higher

Use CSS property “white-space: nowrap” for an element, which should contain non-breaking text.

You could add style class like .nobr and use it later instead of <NOBR> tag:

source code: CSS


source code: XHTML/CSS
출처 :

답글 남기기

이메일은 공개되지 않습니다.