<ruby>


HTML <ruby> Tag

Instance

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>php中文网(php.cn)</title> 
</head>
<body>

<ruby>
  漢 <rp>(</rp><rt>Kan</rt><rp>)</rp>
  字 <rp>(</rp><rt>ji</rt><rp>)</rp>
</ruby>

</body>
</html>

Run Example»

Click the "Run Instance" button to view the online instance


Browser support

1000.png

IE 9+, Firefox, Opera, Chrome and Safari support the <ruby> tag.

Note: IE 8 or earlier IE browsers do not support the <ruby> tag.


Tag definition and usage instructions

<ruby> Tag definition ruby ​​comment (Chinese phonetic or character).

is used in East Asia and displays the pronunciation of East Asian characters.

Use the <ruby> tag with the <rt> and <rp> tags:
The <ruby> element consists of one or more characters that need to be interpreted/pronounced and a character that provides that information The <rt> element also includes the optional <rp> element, which defines the content displayed when the browser does not support the "ruby" element.


Differences between HTML 4.01 and HTML5

The<ruby> tag is a new tag in HTML5.


Global attributes

<ruby> tag supports HTML global attributes.


Event attributes

<ruby> tag supports HTML event attributes.