Skip to content

Right to Left

Olivier Nizet edited this page Aug 23, 2024 · 1 revision

Right to Left (Rtl) and Left to Right

The two major attributes are dir and lang.

When dir is specified, the parser will apply that value ("rtl" or "ltr", case insensitive). Alternatively, you may specify only the lang attribute. If it differs from the body tag, the parser will then distinguish whether the related culture is RTL. Even if the converter supports both attributes, the recommended way is the dir attribute.

Document

If you want to apply RTL on the OpenXml document settings, use the attribute on the body tag.

<body dir="rtl">
   <h1>Heading</h1>
</body>

Text

If you want to apply Rtl on the whole document, you may specify the attribute on the body tag.

<p dir="rtl" style="font-family: 'Sakkal Majalla';">
تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص تجربه إضافة نص.
</p>

List

On a list, use the attribute on the ol or ul tag.

<ol dir="rtl">
   <li>تجربه</li>
   <li>تجربه</li>
   <li>تجربه</li>
</ol>

Table

On a table, use the attribute on the table tag.

<table dir="rtl">
<tr>
    <td>تجربه</td>
    <td>تجربه</td>
    <td>تجربه</td>
</tr>
<tr>
    <td>1</td>
    <td>2</td>
    <td>3</td>
</tr>
</table>

openxm_rtl