Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / HTML

rt — ruby annotation text

The rt element marks ruby annotation text, such as a pronunciation guide. Use it as a direct child of ruby alongside the base text.

Version: WHATWG HTML Living Standard; index snapshot date recorded separately

Syntax

<ruby>base text<rt>annotation</rt></ruby>

rt marks ruby annotation text. The base text stays outside rt; the containing ruby, rather than rt alone, supplies the overall meaning.

Its conforming parent is ruby. Its content model is phrasing content, and global attributes are available. Outside ruby, it represents only its children; that placement is nonconforming.

In HTML syntax, its end tag may be omitted immediately before rt or rp, or at the end of the parent's content. Explicit closing improves readability. rp supplies fallback parentheses for browsers without ruby support.

Examples

<!doctype html>
<html lang="ja">
<head>
  <meta charset="utf-8">
  <title>Ruby</title>
</head>
<body>
  <ruby>山<rt>やま</rt></ruby>
</body>
</html>

Result

山 — ruby annotation: やま

The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.

Sources