HTML5 <wbr> Tag
Topic: HTML5 Tags ReferencePrev|Next
Description
The <wbr> (stands for Word Break Opportunity) element specifies a position within text where the browser may optionally break a line if necessary.
The following table summarizes the usages context and the version history of this tag.
| Placement: | Inline |
|---|---|
| Content: | None. It is an empty element. |
| Start/End Tag: | Start tag: required, End tag: forbidden |
| Version: | New in HTML5 |
Syntax
The basic syntax of the <wbr> tag is given with:
The example below shows the <wbr> tag in action.
Example
Try this code »<p>The XML<wbr>Http<wbr>Request object is the key to AJAX.</p>
Note: If any word is your text is too long, you can put this tag inside that word to indicate the appropriate place to break the word for word wrap purposes.
Tag-Specific Attributes
The <wbr> tag doesn't have any specific attribute.
Global Attributes
Like all other HTML tags, the <wbr> tag supports the global attributes in HTML5.
Event Attributes
The <wbr> tag also supports the event attributes in HTML5.
Browser Compatibility
The <wbr> tag is supported in all major modern browsers.
Basic Support—
|
Further Reading
See tutorial on: HTML Paragraphs.
Related tags: <br>.

