English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag大全

HTML: <ruby> tag

The HTML <ruby> element is used to display phonetic or character annotations for East Asian characters.

Online Example

A ruby annotation:

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>Basic Tutorial Website(oldtoolbag.com)</title> 
</head>
<body>
<ruby>
  ming ri<rp>(</rp><rt>ming ri</rt><rp>)</rp>
</ruby>
</body>
</html>
Test and see ‹/›

Browser compatibility

IEFirefoxOperaChromeSafari

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

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

Definition and usage instructions for tags

The <ruby> tag defines ruby annotations (pinyin or characters).

used in East Asia, showing the pronunciation of East Asian characters.

combine the <ruby> tag with <rt> and <rp> used together with tags:
<ruby> element consists of one or more characters that need to be explained/consists of characters for pronunciation and a <rt> element that provides this information, as well as an optional <rp> element that defines the content to be displayed when the browser does not support the "ruby" element.

HTML 4.01 and HTML5differences between

<ruby> tag is a part of HTML5 in the new tags.

Global attributes

Support for <ruby> tag Global attributes of HTML.

Event attributes

Support for <ruby> tag HTML event attributes.