Bdo dir Property
Example
Change the text direction of the text inside a <bdo> element to "right-to-left":
document.getElementById("myBdo").dir = "rtl";
Try it Yourself »
Description
The dir property sets or returns the value of the dir attribute of a <bdo> element.
The dir attribute specifies the text direction of the text inside a <bdo> element.
Note: For <bdo> elements, the dir attribute is required.
Browser Support
Property | |||||
---|---|---|---|---|---|
dir | Yes | Yes | Yes | Yes | Yes |
Syntax
Return the dir property:
bdoObject.dir
Set the dir property:
bdoObject.dir = "ltr|rtl"
Property Values
Value | Description |
---|---|
ltr | Specifies a left-to-right text direction |
rtl | Specifies a right-to-left text direction |
Technical Details
Return Value: | A String, representing the text direction of the text |
---|
More Examples
Example
Get the text direction of the text inside a <bdo> element:
var x =
document.getElementById("myBdo").dir;
Try it Yourself »
Related Pages
HTML reference: HTML <bdo> dir attribute
❮ Area Object
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.