Katalog HTML Atrybut
Przykład
Akapit z kierunkiem od prawej do lewej:
<p dir="rtl">Write this text right-to-left!</p>
Definicja i użycie
dir
Atrybut określa kierunek tekstu zawartości elementu .
Obsługa przeglądarki
Attribute | |||||
---|---|---|---|---|---|
dir | Yes | Yes | Yes | Yes | Yes |
Składnia
<element dir="ltr|rtl|auto">
Wartości atrybutów
Value | Description |
---|---|
ltr | Default. Left-to-right text direction |
rtl | Right-to-left text direction |
auto | Let the browser figure out the text direction, based on the content (only recommended if the text direction is unknown) |
Powiązane strony
Samouczek HTML: atrybuty HTML
Odniesienie CSS: właściwość kierunku
Dokumentacja HTML DOM: HTML DOM dir Property
Odniesienie HTML DOM: Właściwość kierunku stylu