<rtc>
rtc tag
The <rtc> element in HTML serves as fallback content for ruby annotations when a browser does not support the <ruby>, <rt>, or <rp> tags. It is placed inside the <ruby> element to ensure that alternative text is displayed when ruby annotations cannot be rendered.
Syntax
<ruby>
Base Text
<rt>Annotation</rt>
<rtc>Fallback Text</rtc>
</ruby>
rtc Demo
Example with ruby text: 漢字.
<p>
Example with ruby text: <ruby>漢字<rt>Kanji</rt><rtc>Kanji (fallback)</rtc></ruby>.
</p>
Attributes
This element supports global attributes.
Key Points
- Purpose: The
<rtc>tag provides fallback content when ruby annotations are not supported by the browser. - Usage: Ensures that users with unsupported browsers still receive meaningful content.
- Support: While support for
<rtc>is limited, most modern browsers support<ruby>and<rt>, often making<rtc>optional.
<rtc> tag enhances accessibility by ensuring ruby annotations remain understandable even in environments with limited support for the <ruby> element.See also
Conclusion
The <rtc> tag in HTML acts as a backup for ruby annotations when a browser does not support the <ruby>, <rt>, or <rp> tags. It ensures that users still receive relevant information, maintaining readability even if ruby annotations are not rendered.
<rt>
The HTML <rt> element defines the ruby text or pronunciation for a <ruby> annotation, offering additional context to assist with reading East Asian characters.
<ruby>
The HTML <ruby> element creates a ruby annotation, offering supplementary text like pronunciation or translation above or beside East Asian characters to facilitate reading.