HTML <rt> Tag

Beginner
⏱️ 6 min read
📚 Updated: Jun 2026
🎯 3 Examples
HTML Text

What You’ll Learn

The <rt> tag defines ruby text annotations for East Asian characters. This guide covers syntax with ruby, pronunciation and meaning use cases, styling, browser support, and best practices for beginners.

01

Ruby Text

Annotation role.

02

Inside ruby

Required parent.

03

Pronunciation

Reading hints.

04

Meaning

Translation aids.

05

With rp

Fallback support.

06

Accessible

Semantic markup.

What Is the <rt> Tag?

The <rt> tag is an HTML element used to define the text that should be displayed as ruby annotations. Ruby annotations are small notes typically shown above or beside East Asian characters to provide pronunciation or meaning information.

Valid HTML5 — Ruby Text Element

Pair rt with ruby for semantic annotation markup. Add optional rp for fallback parentheses.

Use rt in language-learning sites, manga readers, dictionaries, and any page that helps readers understand Japanese, Chinese, or Korean characters.

📝 Syntax

Pair rt with the ruby element. Each rt follows the base character it annotates:

syntax.html
<ruby><rt>kan</rt><rt>ji</rt>
</ruby>

Syntax Rules

  • Always place rt inside a ruby element.
  • Put each rt immediately after its base character or character group.
  • Do not wrap base text in deprecated rb.
  • Add rp around rt for graceful fallback in older browsers.

⚡ Quick Reference

TopicCode SnippetNotes
Single character漢<rt>kan</rt>Inside ruby
Multiple chars本<rt>hon</rt>語<rt>go</rt>One rt per base
Parent element<ruby>Required wrapper
Fallback<rp>(</rp>Optional with rt
Stylingclass on rubyNot on rt
Browser supportModern fullIE 10+ partial

⚖️ <rt> vs <rp>

ElementRoleContains
<rt>Ruby annotation textPronunciation or meaning
<rp>Fallback parentheses( and ) punctuation
<ruby>Annotation containerBase text + rt + rp

🧰 Attributes

The <rt> tag does not have specific attributes. It is commonly used inside ruby, which supports global attributes such as class and style for customization.

attributes.html
<ruby class="ruby-text" style="font-size: 1.2em;"><rt>hon</rt><rt>go</rt>
</ruby>
None on rt

rt has no tag-specific attributes. Only global HTML attributes apply.

<rt>kan</rt>
class On ruby

Style the annotation group via the parent ruby element.

class="ruby-text"
style On ruby

Adjust font size or color on ruby; use CSS for rt sizing.

style="font-size: 1.2em"

Examples Gallery

Use rt inside ruby for pronunciation guides and meaning annotations.

👀 Live Preview

Styled ruby with rt annotations for 日本語:

hongo

📚 Common Use Cases

The <rt> tag provides pronunciation guidance and meaning annotations for East Asian characters inside ruby elements.

Providing Pronunciation

The primary purpose of rt is to offer pronunciation guidance for characters.

providing-pronunciation.html
<ruby><rt>on</rt><rt>gaku</rt>
</ruby>
Try It Yourself

Adding Meaning Annotations

You can use rt to provide additional meaning annotations to characters.

adding-meaning-annotations.html
<ruby><rt>science</rt><rt>study</rt>
</ruby>
Try It Yourself

♿ Accessibility

  • Use semantic ruby markuprt gives assistive technology a clear annotation role.
  • Set lang attribute — Declare the correct language on the page or ruby element.
  • Add rp fallback — Ensures annotations stay readable without ruby layout.
  • Write clear rt text — Pronunciation or meaning should be unambiguous for learners.

🧠 How <rt> Works

1

Author adds base + rt

Each base character is followed by its rt annotation inside ruby.

Markup
2

Browser positions rt above

Ruby-capable user agents render rt as smaller text above the base.

Render
3

rp provides fallback

When ruby layout fails, rp shows parentheses around rt text.

Fallback
=

Richer reading experience

Learners see pronunciation or meaning hints directly beside characters.

Browser Support

The <rt> tag is supported in all modern browsers. Internet Explorer 10 and later has partial ruby support.

Baseline · HTML5

Ruby text in modern browsers

Chrome, Firefox, Safari, Edge, and Opera render <rt> annotations inside <ruby> correctly.

100% Modern browsers
Google Chrome Fully supported
Full support
Mozilla Firefox Fully supported
Full support
Apple Safari Fully supported
Full support
Microsoft Edge Fully supported
Full support
Internet Explorer IE 10+ · Partial
Partial
Opera Fully supported
Full support
<rt> tag 100% modern · IE partial

Bottom line: Use <rt> inside ruby for East Asian annotation markup in any modern browser.

Conclusion

Mastery of the <rt> tag is essential for web developers aiming to enhance the presentation of ruby text. Implementing this tag effectively ensures that pronunciation and meaning annotations are displayed accurately, contributing to a richer user experience.

💡 Best Practices

✅ Do

  • Use rt inside ruby elements
  • Test ruby text in different browsers
  • Add rp for fallback readability
  • Style via the parent ruby element

❌ Don’t

  • Use rt outside a ruby context
  • Wrap base text in deprecated rb
  • Put long sentences inside a single rt
  • Assume class on rt is the primary styling hook

Key Takeaways

Knowledge Unlocked

Six truths every developer should know about <rt>

Bookmark these before you annotate East Asian text.

6
Core concepts
🌸 02

Inside ruby

Required parent.

Structure
💬 03

Pronunciation

Reading hints.

Use case
📖 04

Meaning

Translation aids.

Use case
🎨 05

Style ruby

Not rt attrs.

CSS
🌐 06

Full Support

Modern browsers.

Compatibility

❓ Frequently Asked Questions

It defines ruby text — the annotation shown above East Asian characters for pronunciation or meaning.
Inside a ruby element, immediately after each base character it annotates.
No tag-specific attributes. Apply class and style on the parent ruby element.
Yes, for fallback parentheses when ruby layout is not available.
Yes in all modern browsers. IE 10+ has partial ruby support.

Add Ruby Text Annotations

Practice <rt> for pronunciation and meaning inside ruby in the Try It editor.

Try pronunciation example →

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.

6 people found this page helpful