HTML Tags
Advertisements

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:

HTML: <wbr>; XHTML: <wbr />

The example below shows the <wbr> tag in action.

<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.

Browsers Icon

Basic Support—

  • Firefox 3+
  • Google Chrome 1+
  • Internet Explorer ×
  • Apple Safari 4+
  • Opera 11.7+

Further Reading

See tutorial on: HTML Paragraphs.

Related tags: <br>.

Advertisements
Bootstrap UI Design Templates Property Marvels - A Leading Real Estate Portal for Premium Properties