HTML ruby Tag

HTML <ruby>Tag: The HTML<ruby>tag defines a ruby annotation. Ruby annotation is a small extra text, attached to the main text to indicate the pronunciation or meaning of the corresponding characters. This kind of annotation is often used in Japanese publications.

HTML <ruby>Tag

This HTML ruby tag supports both the global and the event attributes.

Syntax: <ruby attributes> Contents… </ruby>

The <ruby> tag contains two other tags which are listed as follows:

<rt>tag: It is used to describe the explanation of the main text on top of the main text.
<rp>tag: It is optional which is used to specify the information which needs to show when browsers are not supported ruby annotations.

Browser compatibility

The HTML<ruby> tag is supported by different types of browsers.

  • Chrome-5.0
  • Firefox-38.0
  • Opera-15.0
  • Safari-5.0
  • Internet Explorer-5.5

Example:

<!DOCTYPE html>
<html>
<body>
<ruby>
 漢 <rt> ㄏㄢˋ </rt>
</ruby>
</body>
</html>

Output:
html ruby tag