Definition
The <rt>
element holds the text component of the <ruby>
element, which consists of the meaning or pronunciation of the <ruby>
element’s content.
Example
<ruby style=font-size:2em;>base<rt>annotation</ruby><br><br>
<ruby style=font-size:2em;>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
base
日本語
日本語
Usage
- The
<rt>
opening tag is required. - The
<rt>
closing tag can be omitted if the<rp>
element is immediately followed by an<rt>
or<rp>
element, or if there is no more content in the parent element. - An
<rp>
element must be a child of a<ruby>
element. - You may wish to wrap the
<rp>
element in parenthesis using the<rp>
element for clearer formatting should the browser not support the<ruby>
tags. - You can find further examples of how to use
<ruby>
elements here.
Attributes
The <rt>
element only supports the Global Attributes.
Specification
Browser Support
Desktop
Chrome | Edge | Firefox | IE | Opera | Safari |
---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes | Yes |
Mobile
Android Webview | Chrome Android | Firefox Android | Opera Android | iOS Safari | Samsung Internet |
---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes | Yes |