HTML -dir- Attribut
Definition und Verwendung
Das
dir
Attribut gibt die Textrichtung des Inhalts des Elements an.
Gilt für
Das
dir
Attribut ist ein globales Attribut und kann für jedes HTML-Element verwendet werden.
Element | Attribut |
---|---|
Alle HTML-Elemente | dir |
Beispiel
Beispiel
Ein Absatz mit einer Richtung von rechts nach links:
<p dir="rtl">Write this text right-to-left!</p>
Browser-Unterstützung
Attribute | |||||
---|---|---|---|---|---|
dir | Yes | Yes | Yes | Yes | Yes |