HTML <ruby> Tag

If this site has been useful, we’d love your support! Running this site takes time and resources, and every small contribution helps us keep creating valuable content. Consider buying us a coffee to keep things going strong!

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

The following table will show you the current browser support for the HTML <ruby> tag.

Desktop
Edge Chrome Firefox Opera Safari
12538155
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
1838144.214.4

Last updated by CSSPortal on: 30th September 2023