You are here: >

HTML <wbr> tag

HTML wbr tagWhen writing in HTML, the <wbr> tag is an inline element that gives the browser an option to break a line 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, as well as related attributes and browser compatibility.

Note: The <wbr> element is usually nested within opening and closing <nobr> tags.

Example code

<p>If you shrink the window enough, you should 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 should see the following line break into smaller sections.

Thisisasupersuperlongwordthatwillbreakifyoujustkeeponshrinkingthebrowserwindowuntilitgetssmallerandsmallerandsmallerandsmaller.

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 <wbr> tag does not have any unique attributes, it does utilize all of the standard attributes.

Compatibility

Internet Explorer Firefox Safari Opera Chrome
Not supported All versions 4.0+ 11.7+ All versions

Also see: <br>, Address, Browser, Compatibility, Line break