rp

Provides fallback parentheses for browsers that do not support ruby annotations.

Description

The <rp> element provides fallback text — typically parentheses — for browsers that do not support ruby annotations. In browsers that support ruby, the content of <rp> is hidden via display: none. In non-supporting environments, it displays, wrapping the annotation in parentheses.

Always include <rp> as a best practice to ensure graceful degradation.

When to Use

  • Inside <ruby>, flanking each <rt> element
  • Any time you use ruby annotations and want graceful degradation

Examples

Why Use rp?

Without <rp>, non-supporting browsers concatenate the annotation directly with the base text, making it unreadable:

Alternative Characters

Any characters can be used instead of parentheses:

CSS

VB hides <rp> via the browser default. The content is only visible in browsers without ruby support.

Accessibility

In supporting browsers, <rp> content is typically hidden from screen readers. In non-supporting environments, the parentheses help clarify that the enclosed text is an annotation.

Related