HTML Tags

HTML <bdo> Tag

Topic: HTML5 Tags ReferencePrev|Next

Description

The <bdo> (short for bidirectional override) tag is used to override the current text direction.

You must specify the dir attribute on this element. This mandatory attribute specifies the base direction of the element's text content, which overrides the inherent directionality of characters as defined in [UNICODE].

The following table summarizes the usages context and the version history of this tag.

Placement: Inline
Content: Inline and text
Start/End Tag: Start tag: required, End tag: required
Version: HTML 4, 4.01, 5

Syntax

The basic syntax of the <bdo> tag is given with:

HTML / XHTML: <bdo dir="ltr|rtl"> ... </bdo>

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

<p>The sequence "1-2-3-4-5" was reversed as: <bdo dir="rtl">1-2-3-4-5</bdo></p>

Tag-Specific Attributes

The following table shows the attributes that are specific to the <bdo> tag.

Attribute Value Description
dir ltr
rtl
Override the current directionality of text inside the <bdo> element, with the value ltr to specify a left-to-right override and rtl to specify a right-to-left override.

Global Attributes

Like all other HTML tags, the <bdo> tag supports the global attributes in HTML5.


Event Attributes

The <bdo> tag also supports the event attributes in HTML5.


Browser Compatibility

The <bdo> tag is supported in all major modern browsers.

Browsers Icon

Basic Support—

  • Firefox 1+
  • Google Chrome 1+
  • Internet Explorer 5+
  • Apple Safari 1+
  • Opera 7+

Further Reading

See tutorial on: HTML Text Formatting.

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