aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/document/dir/index.md
blob: 03e94f32309a9f9b5a2795bbf83dcd7ae20f6efe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
title: Document.dir
slug: Web/API/Document/dir
tags:
  - API
  - Document
  - Propriété
  - Reference
translation_of: Web/API/Document/dir
---
<p>{{ApiRef("")}}</p>

<p>La propriété <code><strong>Document.dir</strong></code> est une chaîne de caractères {{domxref("DOMString")}} représentant la direction du texte du document : de gauche à droite (par défaut) ou de droite à gauche. Les valeurs possibles sont <code>'rtl'</code>, droite vers gauche, et <code>'ltr'</code>, gauche vers droite.</p>

<h2 id="Syntaxe">Syntaxe</h2>

<pre class="syntaxbox"><em>dirStr</em> = <em>document.</em>dir;
<em>document.dir</em> = <em>dirStr;</em>
</pre>

<h2 id="Specifications">Spécifications</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Spécification</th>
   <th scope="col">Statut</th>
   <th scope="col">Commentaire</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName("HTML WHATWG", "#dom-document-dir", "Document.dir")}}</td>
   <td>{{Spec2("HTML WHATWG")}}</td>
   <td>Définition initiale.</td>
  </tr>
 </tbody>
</table>

<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>

<p>{{Compat("api.Document.dir")}}</p>