Thanks to visit codestin.com
Credit goes to www.cssportal.com

CSS Portal

HTML <ruby> Tag

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!

Description

The <ruby> element in HTML is used to provide pronunciation or annotation information for East Asian typography, most commonly for Chinese and Japanese text. It is especially useful for showing furigana, which are small phonetic guides placed above or alongside kanji characters to indicate their pronunciation.

A <ruby> element typically contains a base text and one or more annotations, marked using <rt> (ruby text) and optionally <rp> (ruby parentheses) elements. The <rt> element holds the pronunciation or annotation, while <rp> provides fallback text for browsers that do not support ruby annotations.

For example, in Japanese, the kanji might be annotated with the furigana かん (kan) to help readers pronounce it correctly. When rendered, the base character appears normally, and the annotation appears in a smaller font above or to the side.

The <ruby> element is semantically meaningful: it signals that the enclosed text has an associated pronunciation or explanatory note, which can aid readers, accessibility tools, and text-to-speech systems. Beyond Japanese and Chinese, <ruby> can also be used in educational contexts or for providing transliterations, pronunciation guides, or glosses for any text that may require additional clarification.

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 information will show you the current browser support for the HTML <ruby> tag. Hover over a browser icon to see the version that first introduced support for this HTML tag.

This tag is supported by all modern browsers.
Desktop
Chrome
Edge
Firefox
Opera
Safari
Tablets & Mobile
Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-

Last updated by CSSPortal on: 26th December 2025

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!