CSS Portal

HTML <wbr> Tag

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!

Description

The <wbr> element, which stands for Word Break Opportunity, is an inline HTML tag used to suggest where a long word or URL can be broken and wrapped onto the next line if necessary. It does not create a visible element or add any space on its own; rather, it acts as a hint to the browser, allowing text to break at a certain point without affecting the flow of the content when a break is not needed.

This is particularly useful for content where long strings - such as URLs, email addresses, or unbroken words - might otherwise overflow their containing element, causing layout issues or requiring horizontal scrolling. By inserting a <wbr> at appropriate positions within a word or string, developers can improve readability and prevent awkward overflow without inserting visible hyphens or spaces.

For example, in a long URL, placing <wbr> after certain characters allows the browser to wrap the URL onto the next line if it reaches the container’s edge, while leaving it intact on a single line when there is sufficient space.

Importantly, <wbr> is purely advisory: the browser may choose to ignore it if a line break is unnecessary, ensuring that it does not disrupt the natural flow of text.

Properties

Permitted Parents
Any element that accepts phrasing content
Content
None. It is an empty element.
Start/End Tags
Start tag: required, End tag: forbidden

Example

<h4>With &lt;wbr&gt;</h4>
<p style="width: 200px; border: 1px solid #000;">The longest word in a major dictionary is:
Pneumonoul<wbr>tramicroscopic<wbr>silicovol<wbr>canoconiosis which contains 45 letters</p>
<h4>Without &lt;wbr&gt;</h4>
<p style="width: 200px; border: 1px solid #000;">The longest word in a major dictionary is:
Pneumonoultramicroscopicsilicovolcanoconiosis which contains 45 letters</p>

Attributes

None

Global Attributes

The <wbr> tag also supports the Global Attributes in HTML5

Event Attributes

The <wbr> tag also supports the Event Attributes in HTML5

Browser Support

The following information will show you the current browser support for the HTML <wbr> tag. Hover over a browser icon to see the version that first introduced support for this HTML tag.

This tag is supported by all modern browsers.
Desktop
Chrome
Edge
Firefox
Opera
Safari
Tablets & Mobile
Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-

Last updated by CSSPortal on: 26th December 2025

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!