mozilla

Revision 62326 of <bdo>

  • Revision slug: HTML/Element/bdo
  • Revision title: bdo
  • Revision id: 62326
  • Created:
  • Creator: hobophobe
  • Is current revision? No
  • Comment Use syntax highlighting; one or more formatting changes

Revision Content

The HTML Bidirectional Override Element (<bdo>) is used to override the current directionality of text. It causes the directionality of the characters to be ignored in favor of the specified directionality.

Usage Context

Permitted content Flow content, phrasing content.
Tag omission None, must have both a start tag and an end tag.
Permitted parent elements Any element that accepts phrasing content.
Normative document HTML 5, section 4.6.21;

Attributes

This element has only the global attributes. The dir attribute must be specified for this element, to specify the directionality of the element's text.

DOM Interface

This element implements the HTMLElement interface.

Implementation note: Up to Gecko 1.9.2 inclusive, Firefox implements the HTMLSpanElement interface for this element.

Examples

<!-- Switch text direction -->
<p>This text will go left to right.</p>
<p><bdo dir="rtl">This text will go right to left.</bdo></p>

Result

This text will go left to right.

This text will go right to left.

Notes

The HTML 4 specification did not specify events for this element; they were added in XHTML. This is most likely an oversight.

{{ HTML:Element_Navigation() }}

{{ languages( { "pl": "pl/HTML/Element/bdo" } ) }}

Revision Source

<p>The HTML Bidirectional Override Element (<span style="font-family: Courier New;">&lt;bdo&gt;</span>) is used to override the current directionality of text. It causes the directionality of the characters to be ignored in favor of the specified directionality.</p>
<h2>Usage Context</h2>
<table class="standard-table"> <tbody> <tr> <td>Permitted content</td> <td><a href="/en/HTML/Content_categories#flow_content" title="en/HTML/Content categories#flow content">Flow content</a>, <a href="/en/HTML/Content_categories#phrasing_content" title="en/HTML/Content categories#phrasing content">phrasing content</a>.</td> </tr> <tr> <td>Tag omission</td> <td>None, must have both a start tag and an end tag.</td> </tr> <tr> <td>Permitted parent elements</td> <td>Any element that accepts <a href="/en/HTML/Content_categories#phrasing_content" title="en/HTML/Content categories#phrasing content">phrasing content</a>.</td> </tr> <tr> <td>Normative document</td> <td><a class=" external" href="http://www.w3.org/TR/html5/text-level-semantics.html#the-bdo-element" title="http://www.w3.org/TR/html5/text-level-semantics.html#the-bdo-element">HTML 5, section 4.6.21</a>;</td> </tr> </tbody>
</table>
<h2>Attributes</h2>
<p>This element has only the <a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">global attributes</a>. The <strong><a href="/en/HTML/Global_attributes#dir" title="en/HTML/global attributes#dir">dir</a></strong> attribute must be specified for this element, to specify the directionality of the element's text.</p>
<h3 class="editable">DOM Interface</h3>
<p>This element implements the <code><a href="/en/DOM/element" title="en/DOM/element">HTMLElement</a></code> interface.</p>
<div class="note"><strong>Implementation note: </strong>Up to Gecko 1.9.2 inclusive, Firefox implements the <a href="/en/DOM/span" title="en/DOM/span"><span style="font-family: Courier New;">HTMLSpanElement</span></a> interface for this element.</div>
<h3 name="Example">Examples</h3>
<pre class="brush: html">&lt;!-- Switch text direction --&gt;
&lt;p&gt;This text will go left to right.&lt;/p&gt;
&lt;p&gt;&lt;bdo dir="rtl"&gt;This text will go right to left.&lt;/bdo&gt;&lt;/p&gt;</pre>
<h4>Result</h4>
<p>This text will go left to right.</p>
<p><bdo dir="rtl">This text will go right to left.</bdo></p><h3 name="Notes">Notes</h3>
<p>The HTML 4 specification did not specify events for this element; they were added in XHTML. This is most likely an oversight.</p>
<p>{{ HTML:Element_Navigation() }}</p>
<p>{{ languages( { "pl": "pl/HTML/Element/bdo" } ) }}</p>
Revert to this revision