CSS Portal

HTML <rp> Tag

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!

Description

The <rp> element is a semantic HTML tag used specifically in conjunction with ruby annotations, which are small texts typically rendered above or beside base text to provide pronunciation, translation, or other annotations. The main purpose of <rp> is to provide fallback content for browsers that do not support ruby annotations.

When a browser cannot display ruby text (usually enclosed in the <rt> element), any content inside <rp> will be displayed instead. This ensures that users can still understand the intended annotation even if their browser does not support the ruby layout. Typically, <rp> is used to wrap characters like parentheses around the ruby text, such as ( and ), to visually indicate the presence of a ruby annotation.

For example, in a sentence with Japanese text and its pronunciation:

<ruby>
  漢 <rp>(</rp><rt>かん</rt><rp>)</rp>
  字 <rp>(</rp><rt>じ</rt><rp>)</rp>
</ruby>

In browsers that support ruby annotations, the pronunciation (かん and ) appears above the corresponding kanji ( and ). In browsers that do not support ruby, the <rp> elements display the parentheses to indicate that there is a pronunciation or annotation for the text.

Properties

Permitted Parents
A <ruby> element. <rp> must be positioned immediately before or after an <rt> element
Content
Inline and text
Start/End Tags
Start tag: required, End tag: required

Example

<ruby>
漢 <rt><rp>(</rp>ㄏㄢˋ<rp>)</rp></rt>
</ruby>

Attributes

None

Global Attributes

The <rp> tag also supports the Global Attributes in HTML5

Event Attributes

The <rp> tag also supports the Event Attributes in HTML5

Browser Support

The following information will show you the current browser support for the HTML <rp> tag. Hover over a browser icon to see the version that first introduced support for this HTML tag.

This tag is supported by all modern browsers.
Desktop
Chrome
Edge
Firefox
Opera
Safari
Tablets & Mobile
Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-

Last updated by CSSPortal on: 26th December 2025

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!