--- title: dir slug: Web/HTML/Globale_Attribute/dir tags: - Globales Attribut - HTML - Referenz - Textrichtung translation_of: Web/HTML/Global_attributes/dir ---

{{HTMLSidebar("Global_attributes")}}

Das globale Attribut dir ist ein Attribut, das die Richtung des Elementtextes angibt. Es kann folgende Werte haben:

Nutzungsinformationen

Dieses Attribut ist verpflichtend für das {{ HTMLElement("bdo") }}-Element, bei dem es eine andere Bedeutung hat.

Spezifikationen

Specification Status Comment
{{SpecName('HTML WHATWG', "dom.html#the-dir-attribute", "dir")}} {{Spec2('HTML WHATWG')}}  
{{SpecName('HTML5.1', "dom.html#the-dir-attribute", "dir")}} {{Spec2('HTML5.1')}}  
{{SpecName('HTML5 W3C', "dom.html#the-dir-attribute", "dir")}} {{Spec2('HTML5 W3C')}}  
{{SpecName('HTML4.01', "dirlang.html#h-8.2", "dir")}} {{Spec2('HTML4.01')}}  

Browser-Kompatibilität

{{Compat("html.global_attributes.dir")}}

Siehe auch