HTML ruby - how to use <ruby> tag

The HTML <ruby> tag is used to define characters in East Asian language. It is introduced in HTML5.

The <rt> tag is used with the <ruby> and <rp> tags. The <ruby> tag contains the text that needs to be defined and the <rt> tag is used to define the pronunciation. The <rp> tag is optional and it contain text that will be displayed if the <ruby> tag cannot be rendered.


The ruby tag supports the global and event attributes.


<ruby><rt><rp>(</rp>Random Chinese Characters<rp>)</rp></rt> </ruby>

Related HTML tags:

  • <rt> - used to define pronunciation of the characters within the ruby tag
  • <> - used to render extra information if ruby tag cannot be rendered