HTML <wbr> tag
The HTML (hypertext markup language) <wbr> tag is an inline element that allows a browser to insert a line break in a block of text. It is useful for creating breaks in long words or addresses when a window is resized. The following sections contain information about this tag, including an example of it in use, and related attributes and browser compatibility.
The <wbr> element is usually nested within opening and closing <nobr> tags.
Example of <wbr> code
<p>If you shrink the window enough, you see the following
line break into smaller sections.</p>
<p>Thisisasupersuper<wbr>longword<wbr>thatwillbreak<wbr>ifyou<wbr> justkeepon<wbr>shrinking<wbr>thebrowserwindowuntil<wbr>itgets
smaller<wbr>andsmaller<wbr>andsmaller<wbr>andsmaller<wbr>.</p>
Example result
If you shrink the window enough, you see the following line break into smaller sections.
Thisisasupersuperlongword thatwillbreak ifyou justkeepon shrinking thebrowserwindowuntil itgetssmaller andsmaller andsmaller andsmaller .
Attributes
All HTML tags support standard attributes that define the settings of an HTML element. In addition to the standard settings, the <wbr> tag has the following unique attributes.
Compatibility
Edge | Internet Explorer | Firefox | Safari | Opera | Chrome |
---|---|---|---|---|---|
All versions | Not supported | All versions | 4.0+ | 11.6+ | All versions |
Address, <br>, Browser, Compatibility, Line break, Web design terms