html element
`<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.
[!WARNING] Although this element is widely supported, it was never standard HTML, so you shouldn’t use it. Instead, use the CSS property
white-spacelike this:
<span class="nobr">Long line with no breaks</span>
.nobr {
white-space: nowrap;
}
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.