Firefox Tomorrow

html element

`<rtc>` HTML ruby text container element

View on MDN ↗

The <rtc> HTML element embraces semantic annotations of characters presented in a ruby of <rb> elements used inside of <ruby> element. <rb> elements can have both pronunciation (<rt>) and semantic (<rtc>) annotations.

Interactive exampleOpen the canonical MDN source to run this embedded demo.
<ruby lang="zh-Hant">
  <rbc>
    <rb>馬</rb><rp>(</rp><rt>mǎ</rt><rp>)</rp>
    <rb>來</rb><rp>(</rp><rt>lái</rt><rp>)</rp>
    <rb>西</rb><rp>(</rp><rt>xī</rt><rp>)</rp>
    <rb>亞</rb><rp>(</rp><rt>yà</rt><rp>)</rp>
  </rbc>
  <rtc lang="en">
    <rp>(</rp><rt>Malaysia</rt><rp>)</rp>
  </rtc>
</ruby>
ruby {
  font-size: 2em;
  ruby-position: under;
}

rtc {
  ruby-position: over;
}

Attributes

This element only includes the global attributes.

Examples

<div class="info">
  <ruby>
    <rbc>
      <rb>旧</rb><rt>jiù</rt> <rb>金</rb><rt>jīn</rt> <rb>山</rb><rt>shān</rt>
    </rbc>
    <rtc>San Francisco</rtc>
  </ruby>
</div>
.info {
  padding-top: 10px;
  font-size: 36px;
}

Result

Interactive exampleOpen the canonical MDN source to run this embedded demo.

Technical summary

Content categories None.
Permitted content Phrasing content or [``](/firefox/mdn/html/reference/elements/rt/) elements.
Tag omission The closing tag can be omitted if it is immediately followed by a [``](/firefox/mdn/html/reference/elements/rb/), <rtc> or [``](/firefox/mdn/html/reference/elements/rt/) element opening tag or by its parent closing tag.
Permitted parents A [``](/firefox/mdn/html/reference/elements/ruby/) element.
Permitted ARIA roles Any
DOM interface [`HTMLElement`](/firefox/mdn/api/htmlelement/)

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also