HTML <ruby> Tag

Description

The <ruby> HTML element is intended to add a small annotation above or below the specified text. This form of recording is mainly used for ideographic writing like the Chinese language, but can be used for other languages ​​if you want to write one text over another.
The <ruby> element itself acts as a container for <rt>, it forms an annotation to the text after which it comes; as well as <rp>, this element is for browsers that do not support <ruby>.
The name comes from the word "ruby", which in the printing house denotes a small font.

Properties

Permitted Parents
Any element that accepts phrasing content
Content
Inline and text
Start/End Tags
Start tag: required, End tag: required

Example

<ruby>
漢 <rt><rp>(</rp>ㄏㄢˋ<rp>)</rp></rt>
</ruby>

Attributes

None

Global Attributes

The <ruby> tag also supports the Global Attributes in HTML5

Event Attributes

The <ruby> tag also supports the Event Attributes in HTML5

Browser Support

Desktop
Explorer Edge Chrome Firefox Opera Safari
5Yes538155
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung
YesYes3814YesYes