Table of Contents

HTML - (Element text Directionality | dir attribute) or language direction (ltr | rtl | ttb )

About

The dir global attribute specifies the element's text directionality.

Syntax

The attribute is an enumerated attribute with the following keywords:

Example

ltr

The direction ltr is applied as an attribute of the blockquote HTML element

<blockquote dir=ltr>
<p>I didn't like the play, but then I saw
it under adverse conditions - the curtain was up.</p>
<cite>- Groucho Marx</cite>
</blockquote>

rtl

The direction rtl is applied using Css.

<blockquote>
<p>I didn't like the play, but then I saw
it under adverse conditions - the curtain was up.</p>
<cite>- Groucho Marx</cite>
</blockquote>
blockquote {
  direction: rtl;
}

Documentation / Reference