<rt>
rt tag
The <rt>
element in HTML provides pronunciation or annotation for text within a <ruby>
element. It is primarily used in East Asian typography to display phonetic guidance or explanations.
Syntax
<ruby>
Base Text
<rt>Pronunciation or Annotation</rt>
</ruby>
rt
Demo
<h1>The ruby and rt elements</h1>
<ruby>
漢 <rt> ㄏㄢˋ </rt>
</ruby>
Definition and Usage
The <rt>
tag provides phonetic guidance or additional information for characters, commonly used in East Asian typography for ruby annotations.
It is used alongside the <ruby>
and <rp>
elements: the <ruby>
element contains the base text, the <rt>
element provides the pronunciation or annotation, and the optional <rp>
element serves as fallback text for browsers that lack support for ruby annotations.
Attributes
This element only includes the global attributes.
See also
Conclusion
The <rt>
tag in HTML is used within a <ruby>
element to provide phonetic annotations or explanations for characters, mainly in East Asian typography. It enhances readability and comprehension, especially for languages like Japanese and Chinese. When combined with the <rp>
element, it ensures proper display in browsers without ruby support, improving accessibility and usability.
<rp>
The HTML <rp> element offers parentheses or alternative text for browsers lacking support for ruby annotations. It is used in conjunction with <ruby>, <rt>, and <rb> to enhance the presentation of ruby text.
<rtc>
The HTML <rtc> element, used with <ruby>, identifies portions of ruby annotations that can be omitted by certain browsers or rendering systems, enabling selective visibility of ruby text.