HTML <ruby> tag

Course Recommendation:

<ruby> Definition and Usage

The <ruby> tag specifies ruby annotations.

The ruby annotation is a small additional text attached to the main text, used to indicate the pronunciation or meaning of the corresponding character. This annotation is commonly used in Japanese publications. <rp> With <ruby> And <rt> Used Together:<ruby> An element consists of one or more characters that need to be explained/pronounced, along with the <rt> element that provides this information, and an optional <rp> element, which is used to define what content is displayed for browsers that do not support ruby annotations.

Example

Pinyin Annotation:

<ruby>
漢 <rt> ㄏㄢˋ </rt>
</ruby>

Try It Yourself

Global Attributes

<ruby> The tag also supports Global Attributes in HTML.

Event Attributes

<ruby> The tag also supports Event Attributes in HTML.

Browser Support

The numbers in the table indicate the first browser version to fully support this tag.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
5.0 5.5 38.0 5.0 15.0