Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM dir property

HTML DOM dir property

Element Object Reference Element object


Definition and Usage

The dir property sets or returns the text direction of an element.

Syntax

HTMLElementObject.dir=

text-direction


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the dir property


Example

Example

Return the text direction of the body element:

Try it »


Element Object Reference Element object