HTML <rtc> Tag

Beginner
6 min read
Updated: Nov 2026
4 examples
Deprecated

Definition and Usage

The <rtc> (ruby text container) element once grouped one annotation range inside <ruby> — often a second, semantic layer next to pronunciation in <rt> (commonly with <rb> base units).

Learn it only to recognize legacy markup. For new work, put base text and <rt> directly in <ruby>, add optional <rp> fallbacks, or nest <ruby> for two annotation sides.

Deprecated.

MDN: avoid <rtc> in new projects. The HTML Standard treats it as obsolete for authors.

Still parsed in many browsers.

Legacy recognition is not permission to ship new <rtc>. Double-sided layout with rtc is inconsistent across engines.

HTML Syntax

syntax.html
<ruby>…<rtc> annotation</rtc></ruby>

Parent must be <ruby>. Content is phrasing text or <rt> (and optional <rp>). The end tag may be omitted when followed by <rb>, <rt>, or <rtc>, or by the parent’s end tag (MDN / HTML rules — prefer explicit tags for study).

Modern equivalent (one layer): <ruby>字<rt>ji</rt></ruby>

Attributes

<rtc> has no element-specific attributes — only globals. Common legacy use was lang on the annotation container.

Attribute / patternDescriptionTry it
lang (global)Legacy language of the annotation range (e.g. English gloss)Try it
Use <rt> in <ruby>Correct today — one annotation layer without rtcTry it
Nested <ruby>Two sides (reading + meaning) without rtc; place with ruby-positionTry it
<rp>Fallback parentheses for browsers without ruby layoutTry it

Global Attributes

The <rtc> tag also supports the Global Attributes in HTML (legacy recognition only — do not author new rtc markup).

Live Preview

Compare legacy <rtc> with modern ruby + rt (and a nested double-sided pattern). Prefer modern markup for real pages.

markup style

Study only. New pages should use <ruby> with <rt> (or nested ruby), not <rtc>.

Preview

旧jiù金jīn山shān San Francisco

Using deprecated <rtc> — migrate to ruby / rt (or nested ruby).

HTML Examples

Short snippets for study and migration. Use Try It Yourself for a live editor.

Example 1 — Legacy rtc (Study Only)

Recognize old double-layer markup. Do not copy this into new projects.

HTML
<!-- Deprecated — for study only -->
<ruby lang="zh-Hans">
  <rb>旧</rb><rt>jiù</rt>
  <rb>金</rb><rt>jīn</rt>
  <rb>山</rb><rt>shān</rt>
  <rtc lang="en">San Francisco</rtc>
</ruby>
Try It Yourself

How It Works

  1. Wrap in <ruby>. All ruby pieces live inside this parent.
  2. Mark bases and readings. Legacy <rb> + <rt> pairs give per-character pronunciation.
  3. Add a second range. <rtc> holds a semantic gloss (here, English “San Francisco”).
  4. Treat as archive knowledge. Valid for understanding old pages, not for new HTML.

Example 2 — Modern ruby + rt

One annotation layer: put base characters and rt directly inside ruby — no rtc.

HTML
<ruby lang="ja">
  漢<rt>かん</rt>
  字<rt>じ</rt>
</ruby>
Try It Yourself

How It Works

  1. Open <ruby>. Set lang when the base script needs it.
  2. Write each base character as plain text (no rb required).
  3. Follow with <rt>. That is the pronunciation (or short gloss).
  4. Skip rtc. One layer does not need a text container.

Example 3 — Nested ruby (Two Sides)

Portable alternative to rtc for reading + meaning: nest ruby and place sides with CSS.

HTML
<style>
  .double { ruby-position: under; }
  .double ruby { ruby-position: over; }
</style>

<ruby class="double">
  <ruby>東<rt>とう</rt></ruby>
  <rt>east</rt>
</ruby>
Try It Yourself

How It Works

  1. Inner ruby holds the base and the first annotation (e.g. kana).
  2. Outer ruby wraps that unit and adds a second rt (e.g. English).
  3. Set ruby-position so one side is over and the other under.
  4. Prefer this over rtc for clearer cross-engine results.

Example 4 — Add rp Fallback

Parentheses show for readers when ruby layout is unavailable.

HTML
<ruby lang="ja">
  漢<rp>(</rp><rt>かん</rt><rp>)</rp>
  字<rp>(</rp><rt>じ</rt><rp>)</rp>
</ruby>
Try It Yourself

How It Works

  1. Keep modern ruby + rt. No rtc wrapper.
  2. Wrap each rt with <rp>(</rp> … <rp>)</rp>.
  3. Ruby-capable browsers hide the parentheses and show annotations beside the base.
  4. Fallback browsers still show readable text like 漢(かん).

Edge Cases & Pitfalls

Most problems come from treating parsing support as a green light to keep shipping rtc.

deprecated

Do not use in new HTML

Validators and linters flag <rtc>. Author <ruby> + <rt> instead.

layout

Double-sided rtc is inconsistent

Engines may parse the tags but misplace a second annotation row. Prefer nested ruby + ruby-position.

companions

rb / rbc are also legacy

Many old tutorials pair rtc with <rb> and rbc. Skip all three in new pages.

semantics

rt is not deprecated

Keep using <rt> for annotation text. Only the rtc container is the problem to remove.

a11y

Keep annotations short

Long glosses crowd the line. Prefer concise rt text and expand meaning in nearby prose when needed.

Browser Support

<rtc> is a deprecated HTML element. Prefer <ruby> with <rt> (or nested ruby) in every modern document.

✓ Deprecated · Avoid in new work

<rtc>

Parsed in many engines for legacy content, but MDN marks it Deprecated. Useful double-sided rtc layout is inconsistent — do not rely on it for new pages.

Avoid Author guidance
Google Chrome Parses (layout varies)
Deprecated
Mozilla Firefox Best legacy rtc layout
Deprecated
Apple Safari Parses (layout varies)
Deprecated
Microsoft Edge Parses (layout varies)
Deprecated
Opera Parses (layout varies)
Deprecated
Samsung Internet Parses (layout varies)
Deprecated
Internet Explorer Limited / legacy
Deprecated
<rtc> Do not use in new pages

Bottom line: Parsing support is not a green light. Migrate to ruby + rt (or nested ruby) and treat rtc as archive knowledge.

Key Takeaways

  • Status: <rtc> is deprecated — study it, do not ship it.
  • Replacement: <ruby> + <rt>; nest ruby for two sides.
  • Fallback: add <rp> parentheses when helpful.
  • Keep rt: only the rtc container is obsolete; annotation text stays in rt.

One line: recognize <rtc>, replace it with <ruby> + <rt> (or nested ruby).

Default CSS Settings

Typical user-agent mapping for ruby-related display values (engines may vary):

default.css
ruby { display: ruby; }
rb   { display: ruby-base; }
rt   { display: ruby-text; }
rtc  { display: ruby-text-container; }
rbc  { display: ruby-base-container; }

Style modern pages with selectors on ruby and rt. Leave rtc rules only while cleaning legacy CSS.

Frequently Asked Questions

Historically, rtc (ruby text container) grouped one annotation range inside ruby — often a second, semantic layer next to pronunciation in rt. MDN marks it deprecated; do not use it in new pages.
No for authors. The HTML Standard lists rtc as obsolete/non-conforming. MDN labels it Deprecated. Prefer ruby with rt (and optional rp), or nested ruby for two annotation sides.
For one annotation layer, put base text and rt directly inside ruby. For two sides (reading + meaning), nest ruby elements and place each side with CSS ruby-position. Add rp for fallback parentheses when helpful.
No element-specific attributes. Only global attributes (for example lang on a legacy rtc for the annotation language). Apply lang and class on ruby or rt in modern markup.
rt is the annotation text itself and remains valid. rtc was a container for a whole annotation range (often wrapping rt, or holding semantic text). Skip rtc; keep using rt.
Usually they still parse. Useful double-sided layout for rtc is inconsistent across engines (historically stronger in Firefox). Treat rtc as legacy recognition, not a pattern to copy.

Next: ruby

Learn the supported ruby annotation container for modern HTML.

ruby tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

10 people found this page helpful