direction property
Specifies the text direction.
The direction property affects the horizontal rendering order only, the left and right sides of the margin, border and padding are not swapped.
| JavaScript page for this property: direction. You can find other example(s) there. |
Possible values:
One of the following values: | Takes the value of this property from the computed style of the parent element. | |||||||
| Default. Left to right. | |||||||
| Right to left. |
Default: ltr.
Example HTML code 1:
This example illustrates the use of the direction property:
|
|
||||
<head> <style> .ltr { font-size: 20pt; direction: ltr; } .rtl { font-size: 20pt; direction: rtl; } </style> </head> <body> <p class="ltr"> 0 1 2 3 4 5 6 7 8 9 </p> <p class="rtl"> 0 1 2 3 4 5 6 7 8 9 </p> </body> |
||||
|
||||
|
Did you find this example helpful?
|
Supported by tags:
a, abbr, acronym, address, b, bdo, big, blink, blockQuote, body, button, caption, center, cite, code, col, colGroup, dd, del, dfn, dir, div, dl, dt, em, fieldSet, font, form, H1, H2, H3, H4, H5, H6, hr, html, i, iframe, img, input:button, input:checkbox, input:file, input:image, input:password, input:radio, input:range, input:reset, input:search, input:submit, input:text, ins, isIndex, kbd, label, legend, li, listing, marquee, menu, nobr, 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
Related pages:
External links:
direction (MSDN)
direction (Mozilla Developer Center)
direction (Safari Reference Library)
direction (W3C)
direction (Mozilla Developer Center)
direction (Safari Reference Library)
direction (W3C)
User Contributed Comments