<bdo>

  • Revision slug: HTML/Element/bdo
  • Revision title: bdo
  • Revision id: 62328
  • Created:
  • Creator: FreakCERS
  • Is current revision? No
  • Comment 1 words added

Revision Content

Summary

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

Like all other HTML elements, this element has the global attributes.

{{ htmlattrdef("dir") }}
Text direction in this element. Possible values are:
  • ltr: Indicates that the text should go in a left-to-right direction.
  • rtl: Indicates that the text should go in a right-to-left direction.
  • auto: The browser decides which direction based on the element's content.

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

<h2>Summary</h2>
<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>Like all other HTML elements, this element has the <a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">global attributes</a>.</p>
<dl> <dt>{{ htmlattrdef("dir") }}</dt> <dd>Text direction in this element. Possible values are: <ul> <li><code>ltr</code>: Indicates that the text should go in a left-to-right direction.</li> <li><code>rtl</code>: Indicates that the text should go in a right-to-left direction.</li> <li><code>auto</code>: The browser decides which direction based on the element's content.</li> </ul> </dd>
</dl>
<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