MDN self-hosted library · e01.org

`<nobr>` HTML non-breaking text element

The <nobr> HTML element prevents the text it contains from automatically wrapping across multiple lines, potentially resulting in the user having to scroll horizontally to see the entire width of the text.

The <nobr> HTML element prevents the text it contains from automatically wrapping across multiple lines, potentially resulting in the user having to scroll horizontally to see the entire width of the text.

[!WARNING] Although this element is widely supported, it was never standard HTML, so you shouldn't use it. Instead, use the CSS property white-space like this:

<span class="nobr">Long line with no breaks</span>
.nobr {
  white-space: nowrap;
}

Specifications

Browser compatibility

See also

  • white-space
  • overflow