HTML wbr Tag

HTML <wbr> Tag: The HTML<wbr> tag stands for Word Break Opportunity. This HTML wbr tag defines wherein a text it would be ok to add a line-break. When a word is too long, or you are afraid that the browser will break your lines at the wrong place, you can use the <wbr> element to add word break opportunities.

HTML <wbr> Tag

This HTML wbr tag supports both the global and the event attributes.

Syntax: <wbr>Text</wbr>

Browser compatibility

The HTML<wbr> tag is supported by different types of browsers.

  • Chrome
  • Firefox
  • Opera
  • Safari
  • Internet Explorer

Example:

<!DOCTYPE html>
<html>
<body>
<p>Try to shrink the browser window, to view how the very long word in 
the paragraph below will break:</p>
<p>This is a veryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryvery<wbr>longwordthatwillbreakatspecific<wbr>placeswhenthebrowserwindowisresized.</p>
</body>
</html>

Output:

Try to shrink the browser window, to view how the very long word in the paragraph below will break:

This is a veryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryverylongwordthatwillbreakatspecificplaceswhenthebrowserwindowisresized.

Note: The wbr element is not supported in Internet Explorer 11 and earlier versions.