HTML <nobr> tag

Updated: 11/13/2018 by Computer Hope
HTML nobr tag

When writing in HTML, the <nobr> tag was used to designate that a section of text should not wrap automatically. The following sections contain information about this tag, including an example of it in use, as well as related attributes, browser compatibility.

Note

The nobr element is proprietary and deprecated. You should use the CSS style "white-space: nowrap" instead.

Example code

<p><nobr>Here is an example of a very, very long line of text that normally would wrap at the end of the line. Instead, because it is contained in a <b>nobr</b> element, it is displayed as one long line.</nobr></p>

The above code, rendered in a web browser:

Here is an example of a very, very long line of text that normally would wrap at the end of the line. Instead, because it is contained in a <nobr> element, it is displayed as one long line.

Attributes

Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair. While the <nobr> tag does not have any unique attributes, it will utilize all of the standard attributes until it is removed in a future version of HTML.

Compatibility

Edge Internet Explorer Firefox Safari Opera Chrome
Not Supported Not Supported Not Supported Not Supported Not Supported Not Supported

<br>, Browser, Code, Compatibility, Web design terms