Skip to content

<wbr> - The Word Break Opportunity Element

Inline HTML5 Void Element

The word break opportunity element represents a position within text where the browser may optionally break a line, though its line-breaking rules would not otherwise create a break at that location.

Result
<!-- HTML5 -->
<wbr>
<!-- XHTML (also valid in HTML5) -->
<wbr />

The <wbr> element is a void element (self-closing), with no content.

Result
Result
Result
Result
Result
Result
Result
Result
Result
Result
<!-- Optional break (browser decides) -->
<p>https://www.<wbr>example.<wbr>com</p>

Breaks only if needed for wrapping.

Result

Place <wbr> at logical break points:

Result

You can achieve similar effects with CSS:

Result
<!-- Fine-grained control over break points -->
<p>example.<wbr>com/<wbr>path</p>

<wbr> is semantically better than using zero-width space character:

<!-- Semantic HTML -->
<p>example.<wbr>com</p>

Especially useful for mobile layouts:

Result

Screen readers ignore <wbr> elements - they don’t announce breaks or pauses.

The element is purely for visual presentation:

<!-- Screen readers read this as one continuous string -->
<p>example.<wbr>com/<wbr>path</p>
<!-- Read as: "example.com/path" -->

Use <wbr> when you have:

  • Long URLs
  • File paths
  • Technical identifiers
  • Long words or compound words
  • Code snippets
  • Email addresses

Don’t use <wbr> for:

  • Regular text content
  • Forcing line breaks (use <br>)
  • Creating visual spacing
  • Short words

<wbr> has minimal performance impact as it’s just a hint to the browser’s line-breaking algorithm.

BrowserVersionNotes
Chrome1+Full support
Firefox3+Full support
Safari4+Full support
Edge79+Full support
IE5.5+Partial support

The <wbr> element has excellent browser support. Older browsers that don’t recognize it simply ignore it harmlessly.