aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/html/element/bdo/index.html
blob: 5a1daa585b74889428f963ddd384e6b6ccdd9b50 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
---
title: '<bdo>: 双方向文字列上書き要素'
slug: Web/HTML/Element/bdo
tags:
  - BiDi
  - 双方向テキスト
  - 要素
  - HTML
  - HTML 文字レベルの意味付け
  - 'HTML:フローコンテンツ'
  - 'HTML:知覚可能コンテンツ'
  - 'HTML:記述コンテンツ'
  - 左書き
  - リファレンス
  - テキスト
  - 右書き
  - 書字方向
  - テキスト描画
  - Web
  - ltr
  - rtl
browser-compat: html.elements.bdo
translation_of: Web/HTML/Element/bdo
---
<div>{{HTMLRef}}</div>

<p><strong><code>&lt;bdo&gt;</code></strong><a href="/ja/docs/Web/HTML">HTML</a> の要素で、現在のテキストの書字方向を上書きし、中のテキストが異なる書字方向で描画されるようにします。</span></p>

<div>{{EmbedInteractiveExample("pages/tabbed/bdo.html", "tabbed-standard")}}</div>

<p>テキストの文字は指定された方向の開始位置から描画されます。それぞれの文字の向きには影響を与えません (ですから、例えば、文字は裏返しにはなりません)。</p>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row"><a href="/ja/docs/Web/Guide/HTML/Content_categories">コンテンツカテゴリー</a></th>
   <td><a href="/ja/docs/Web/Guide/HTML/Content_categories#flow_content">フローコンテンツ</a>, <a href="/ja/docs/Web/Guide/HTML/Content_categories#phrasing_content">記述コンテンツ</a>, 知覚可能コンテンツ</td>
  </tr>
  <tr>
   <th scope="row">許可されている内容</th>
   <td><a href="/ja/docs/Web/Guide/HTML/Content_categories#phrasing_content">記述コンテンツ</a></td>
  </tr>
  <tr>
   <th scope="row">タグの省略</th>
   <td>{{no_tag_omission}}</td>
  </tr>
  <tr>
   <th scope="row">許可されている親要素</th>
   <td><a href="/ja/docs/Web/Guide/HTML/Content_categories#phrasing_content">記述コンテンツ</a>を受け入れるすべての要素</td>
  </tr>
  <tr>
   <th scope="row">暗黙の ARIA ロール</th>
   <td><a href="https://www.w3.org/TR/html-aria/#dfn-no-corresponding-role">対応するロールなし</a></td>
  </tr>
  <tr>
   <th scope="row">許可されている ARIA ロール</th>
   <td>すべて</td>
  </tr>
  <tr>
   <th scope="row">DOM インターフェイス</th>
   <td>{{domxref("HTMLElement")}}。Gecko 1.9.2 (Firefox 4) 以前では、Firefox はこの要素に対し <code><a href="/ja/docs/Web/API/HTMLSpanElement">HTMLSpanElement</a></code> インターフェイスを実装しています。</td>
  </tr>
 </tbody>
</table>

<h2 id="Attributes">属性</h2>

<p>この要素には<a href="/ja/docs/Web/HTML/Global_attributes">グローバル属性</a>があります。</p>

<dl>
 <dt>{{htmlattrdef("dir")}}</dt>
 <dd>この要素の内容において、テキストが描画される方向です。以下の値が指定可能です。
 <ul>
  <li><code>ltr</code>: テキストを左から右へ (left-to-right) 向かわせることを意味する指定。</li>
  <li><code>rtl</code>: テキストを右から左へ (right-to-left) 向かわせることを意味する指定。</li>
 </ul>
 </dd>
</dl>

<h2 id="Examples"></h2>

<pre class="brush: html">&lt;!-- 書字方向を切り替える --&gt;
&lt;p&gt;This text will go left to right.&lt;/p&gt;
&lt;p&gt;&lt;bdo dir="rtl"&gt;This text will go right
to left.&lt;/bdo&gt;&lt;/p&gt;
</pre>

<h3 id="Result">結果</h3>

<p>{{EmbedLiveSample('Examples')}}</p>

<h2 id="Notes">メモ</h2>

<p>HTML 4 の仕様では、この要素にイベントが指定されていません。イベントは XHTML で追加されました。これは、恐らく見落としでしょう。</p>

<h2 id="Specifications">仕様書</h2>

<p>{{Specifications}}</p>

<h2 id="Browser_compatibility">ブラウザーの互換性</h2>

<p>{{Compat}}</p>

<h2 id="See_also">関連情報</h2>

<ul>
 <li>関連する HTML 要素: {{HTMLElement("bdi")}}</li>
</ul>