The Ruby Annotation Element

1 month ago 5

Try it

<ruby> 明日 <rp>(</rp><rt>Ashita</rt><rp>)</rp> </ruby>
ruby { font-size: 2em; }

Attributes

This element only includes the global attributes.

Examples

>

Example 1: Character

html

<ruby> 漢 <rp>(</rp><rt>Kan</rt><rp>)</rp> 字 <rp>(</rp><rt>ji</rt><rp>)</rp> </ruby>

Result

Example 2: Word

html

<ruby> 明日 <rp>(</rp><rt>Ashita</rt><rp>)</rp> </ruby>

Result

Technical summary

Content categories Permitted content Tag omission Permitted parents Implicit ARIA role Permitted ARIA roles DOM interface
Flow content, phrasing content, palpable content.
Phrasing content.
None, both the starting and ending tag are mandatory.
Any element that accepts phrasing content.
No corresponding role
Any
HTMLElement

Specifications

Specification
HTML>
# the-ruby-element>

Browser compatibility

Loading…

See also

Help improve MDN

Was this page helpful to you?

Yes No

Learn how to contribute

This page was last modified on ⁨Jul 9, 2025⁩ by MDN contributors.

Read Entire Article