HTML dir-eigenschap
- Previous page data-*
- Next page draggable
- Go up one level HTML Global Attributes
Definitie en gebruik
dir
Het kenmerk bepaalt de tekstrichting van de inhoud van het element.
See also:
HTML tutorial:HTML attributes
CSS reference manual:CSS direction attribute
HTML DOM reference manual:HTML DOM dir attribute
HTML DOM reference manual:Style direction attribute
Example
A paragraph with a text direction from right to left:
<p dir="rtl">Write this text right-to-left!</p>
Syntax
<element dir="ltr|rtl|auto">
Attribute value
Value | Description |
---|---|
ltr | Default. Text direction from left to right. |
rtl | Text direction from right to left. |
auto | Let the browser determine the text direction based on the content (recommended only when the text direction is unknown). |
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |
- Previous page data-*
- Next page draggable
- Go up one level HTML Global Attributes