English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML reference manual

HTML tag大全

HTML: <bdo> Tag

The <bdo> element (HTML bidirectional override element) is used to override the current text direction, allowing characters to be arranged in the given direction.

Online example

Specify text direction:

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>HTML5 Example by www.oldtoolbag.com/title>
</head>
<body>
<h1Famous seaside songs/h1
The English song "Oh I do like to be beside the seaside"/p>
Looks like this in Hebrew:/span>/p>
In the computer39Memory; this is stored as/bdo></p>
<p>The text of this paragraph is displayed from left to right.</p>  
<p><bdo dir="rtl">The text of this paragraph is displayed from right to left.</bdo></p>
</body>
</html>
Test and see ‹/›

Browser compatibility

IEFirefoxOperaChromeSafari

All mainstream browsers support the <bdo> tag.

Definition and usage instructions of the tag

bdo refers to bidi override (Bi-directional Override).-Directional Override).

<bdo> tag is used to override the default text direction.

HTML 4.01 and HTML5Differences between

None.

Attribute

AttributeValueDescription
dirltr
 rtl

Required. Specifies the text direction within the <bdo> element.

The attribute value can be:
    ltr: Writes from left to right, consistent with the writing habits of modern Chinese.
    rtl: Writes from right to left, consistent with the writing habits of ancient Chinese.

Global attributes

Support for <bdo> tag Global attributes of HTML.

Event attributes

Support for <bdo> tag HTML event attributes.