Description
The HTML element <rt>
is used to define the pronunciation of characters presented within ruby annotations.
- The pronunciation text enclosed within the
<rt>
element is displayed as a smaller text over the text enclosed within the<ruby>
element.
Ruby annotations are used for showing the pronunciation of East Asian characters like Chinese or Japanese characters.
The below table summarizes its usage.
Usage Details | |
Placement | It is displayed as an Inline element. |
Contents | It can contain Inline elements and text. |
Tags | Both the opening and closing tags are required. |
Versions | HTML 5 |
Syntax
Here is the basic syntax of the <rt>
element.
<rt>...</rt>
Examples
<!DOCTYPE html>
<html lang="en">
<head>
<title>Example - HTML Element rt</title>
</head>
<body>
<ruby>
漢 <rp>(</rp><rt>Kan</rt><rp>)</rp>
字 <rp>(</rp><rt>ji</rt><rp>)</rp>
</ruby>
</body>
</html>
Attributes
The following table shows the list of supported and unsupported attributes for the <rt>
element.
Attribute Type | Details |
Element-Specific Attributes | The tag <rt> doesn't have any element-specific attributes. |
Global Attributes | Like all other HTML tags, the tag <rt> supports the HTML Global Attributes. |
Event Attributes | The tag <rt> also supports the HTML Event Attributes. |
Browser Compatibility
The tag <rt>
is supported in all modern browsers.
- Google Chrome 5+
- Internet Explorer or Edge 5.5+
- Firefox x
- Apple Safari 5+
- Opera 15+