-
Notifications
You must be signed in to change notification settings - Fork 8k
/
index.md
54 lines (37 loc) · 2.03 KB
/
index.md
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
---
title: <ruby>
slug: Web/HTML/Element/ruby
---
{{HTMLSidebar}}
**HTML `<ruby>` 元素**的意思是旁註標記。旁註標記用於標示東亞文字的發音。
{{EmbedInteractiveExample("pages/tabbed/ruby.html", "tabbed-shorter")}}
| [內容類型](/zh-TW/docs/Web/HTML/Content_categories) | [流內容](/zh-TW/docs/Web/HTML/Content_categories#Flow_content)、[段落型內容](/zh-TW/docs/Web/HTML/Content_categories#Phrasing_content)、捫及內容 |
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| 允許內容 | [段落型內容](/zh-TW/docs/Web/HTML/Content_categories#Phrasing_content) |
| 標籤省略 | 不允許,開始和結束標籤都是必須的。 |
| 允許父元素 | Any element that accepts [phrasing content](/zh-TW/docs/HTML/Content_categories#Phrasing_content) |
| DOM 介面 | {{domxref("HTMLElement")}} |
## 屬性
這個元素只支援[全域屬性](/zh-TW/docs/Web/HTML/Global_attributes)。
## 範例
### 範例一:字
```html
<ruby>
漢 <rp>(</rp><rt>Kan</rt><rp>)</rp> 字 <rp>(</rp><rt>ji</rt><rp>)</rp>
</ruby>
```
### 範例二:詞
```html
<ruby> 明日 <rp>(</rp><rt>Ashita</rt><rp>)</rp> </ruby>
```
## 規範
{{Specifications}}
## 瀏覽器相容性
{{Compat}}
## 參閱
- {{HTMLElement("rt")}}
- {{HTMLElement("rp")}}
- {{HTMLElement("rb")}}
- {{HTMLElement("rtc")}}
- {{HTMLElement("rbc")}}
- {{CSSxRef("text-transform")}}: full-size-kana