HTML <rtc> Element
The <rtc> element, short for ruby text container, was used inside a <ruby> element to group ruby annotation text. It made it possible to associate additional or more complex annotations with ruby base text, including multiple levels of annotation.
<rtc> element must not be used in new HTML. Use <rt> for ruby annotation text and nested <ruby> elements when more complex ruby annotations are required.
Historical Syntax
HTML using the <rtc> element could contain markup similar to the following:
<ruby>
<rb>漢字</rb>
<rt>かんじ</rt>
<rtc>
<rt>kanji</rt>
</rtc>
</ruby>
In this example, one annotation supplies a Japanese reading while the <rtc> element groups an additional annotation. The element was designed for ruby structures that needed more than a simple base-text and annotation pair. This code is shown for historical reference only and should not be used in new HTML.
Attributes
The <rtc> element did not have any element-specific attributes. Its purpose came from its position within a <ruby> element and the ruby annotation content that it grouped.
Historical Use
Ruby annotations are commonly used with East Asian text to display pronunciation or other explanatory information alongside the base characters. A basic ruby structure generally needs only the base text and an <rt> annotation.
The <rtc> element was intended for more complex situations. It could group ruby text into an additional annotation level, allowing the same base text to have more than one type of annotation.
For example, one annotation could provide a phonetic reading while another supplied a transliteration or other explanatory information. The <rtc> element acted as a container for that additional ruby text rather than representing the annotation text itself.
Why It Became Obsolete
The <rtc> element was removed from modern HTML because complex ruby annotations can be represented using nested <ruby> elements. This avoids requiring a separate container element solely for additional levels of ruby text.
For ordinary ruby annotations, the base text can be placed directly inside <ruby> and followed by an <rt> element. When multiple levels or more complicated relationships are needed, ruby structures can be nested.
This provides a modern way to represent both simple and complex annotations without using <rtc>.
Modern Alternative
For a simple ruby annotation, place the base text directly inside <ruby> and use <rt> for the annotation:
<ruby>
漢字
<rt>かんじ</rt>
</ruby>
When the same text requires more than one level of annotation, nested <ruby> elements can be used instead of <rtc>:
<ruby>
<ruby>
漢字
<rt>かんじ</rt>
</ruby>
<rt>kanji</rt>
</ruby>
In this example, the inner ruby supplies one annotation while the outer ruby supplies an additional annotation. This allows complex ruby structures to be created without the obsolete <rtc> element.
Legacy Browser Support
The <rtc> element received limited browser support and may still be recognized by some browsers for compatibility with existing content. Support for its intended complex ruby behavior has not been consistent across browsers.
Legacy browser recognition does not make <rtc> valid for use in modern HTML. Existing markup should be updated using <rt> and, when necessary, nested <ruby> elements.
Related Elements
The <ruby> element represents a ruby annotation, while the <rt> element contains the annotation text. The <rp> element provides fallback parentheses for browsers that do not display ruby annotations. The obsolete <rb> element was used to explicitly identify ruby base text.
Specifications
The <rtc> element is listed as an entirely obsolete, non-conforming feature in the WHATWG HTML Living Standard . Authors should use nested <ruby> elements when additional levels of ruby annotation are required.
