The <rp> tag specifies an alternative text, displayed in the browsers, that don't support the <ruby> tag defining ruby annotations, which are often used in Japanese publications.

The <rp> tag is one of the HTML5 elements.

The browsers that support the <ruby> tag, don’t display the text inside the <rp> tag. The <rp> tag is placed before or after the <rt> tag, which defines the annotation of the text in the <ruby> tag.

Syntax

The <rp> tag comes in pairs. However, the closing tag isn’t required, if it comes the last.

Example of the HTML <rp> tag:

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
  </head>
  <body>
    <ruby><rp>(</rp><rt>Kan</rt><rp>)</rp><rp>(</rp><rt>ji</rt><rp>)</rp>
    </ruby>
  </body>
</html>

Result

rp tag example

Attributes

The<rp> tag supports the Global Attributes and the Event Attributes.

Browser support

chrome firefox safari opera
5+ 38+ 5+ 15+

Practice Your Knowledge

What is the HTML <rp> tag used for in HTML encoding?

Quiz Time: Test Your Skills!

Ready to challenge what you've learned? Dive into our interactive quizzes for a deeper understanding and a fun way to reinforce your knowledge.

Do you find this helpful?