dir attribute | dir property
Sets or retrieves the reading order of the object.
Syntax
| HTML | <element dir="p" ... > |
|---|---|
| JavaScript | |
Property values
Type: String
Remarks
Unless explicitly set, the dir property has no return value when accessed in script.
The property does not affect alphanumeric characters in Latin documents. These characters always render ltr. However, the property does affect punctuation characters in Latin documents. For example, punctuation marks such as periods and question marks render to the left of a sentence when the dir property is set to rtl.
See also
- a
- abbr
- acronym
- address
- area
- b
- bdo
- big
- blockQuote
- body
- button
- caption
- center
- cite
- code
- col
- colGroup
- custom
- dd
- del
- dfn
- dir
- div
- dl
- dt
- em
- embed
- fieldSet
- font
- form
- hn
- html
- i
- img
- input type=button
- input type=checkbox
- input type=email
- input type=file
- input type=image
- input type=number
- input type=password
- input type=radio
- input type=range
- input type=reset
- input type=search
- input type=submit
- input type=tel
- input type=text
- input type=url
- ins
- kbd
- label
- legend
- li
- listing
- map
- marquee
- menu
- noBR
- object
- ol
- optGroup
- option
- p
- plainText
- pre
- q
- rt
- ruby
- s
- samp
- select
- small
- span
- strike
- strong
- sub
- sup
- table
- tBody
- td
- textArea
- tFoot
- th
- tHead
- tr
- tt
- u
- ul
- var
- xmp
- Reference
- direction
- Conceptual
- HTML Character Sets