5 ms·
Per https://html.spec.whatwg.org/multipage/dom.html#the-dir-attribute https://html.spec.whatwg.org/multipage/dom.html#the-dir-attr... it'll default to LTR > Th
by missblit 5y ago
Per https://html.spec.whatwg.org/multipage/dom.html#the-dir-attribute https://html.spec.whatwg.org/multipage/dom.html#the-dir-attr... it'll default to LTR
> The directionality of an element (any element, not just an HTML element) is either 'ltr' or 'rtl', and is determined as per the first appropriate set of steps from the following list:
> ... If the element is a document element and the dir attribute is not in a defined state (i.e. it is not present or has an invalid value) ...
> ... The directionality of the element is 'ltr'.
It's not that common to see LTR explicitly specified for the document, but you could imagine some code that either outputs ltr or rtl based on the user's preferences. (Indeed I just checked and twitter puts a rtl there if you're using it in Arabic)