- HTML Tutorial
- HTML - Home
- HTML - History and Evolution
- HTML - Overview
- HTML - Editors
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Headings
- HTML - Paragraphs
- HTML - Quotations
- HTML - Comments
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Style Sheet
- HTML - CSS Classes
- HTML - CSS IDs
- HTML - Images
- HTML - Image Map
- HTML Tables
- HTML - Tables
- HTML - Headers & Caption
- HTML - Table Styling
- HTML - Table Colgroup
- HTML - Nested Tables
- HTML Lists
- HTML - Lists
- HTML - Unordered Lists
- HTML - Ordered Lists
- HTML - Definition Lists
- HTML Links
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Iframes
- HTML - Blocks
- HTML Backgrounds
- HTML - Backgrounds
- HTML Colors
- HTML - Colors
- HTML - RGB
- HTML - HEX
- HTML - HSL
- HTML Forms
- HTML - Forms
- HTML - Form Attributes
- HTML - Form Control
- HTML - Input Attributes
- HTML Media
- HTML - Video Element
- HTML - Audio Element
- HTML - Embed Multimedia
- HTML Header
- HTML - Head Element
- HTML - Adding Favicon
- HTML - Javascript
- HTML Layouts
- HTML - Layouts
- HTML - Layout Elements
- HTML - Layout using CSS
- HTML - Responsiveness
- HTML - Symbols
- HTML - Emojis
- HTML - Style Guide
- HTML Graphics
- HTML - SVG
- HTML - Canvas
- HTML APIs
- HTML - Geolocation API
- HTML - Drag & Drop API
- HTML - Web Workers API
- HTML - WebSocket
- HTML - Web Storage
- HTML - Server Sent Events
- HTML Miscellaneous
- HTML - MathML
- HTML - Microdata
- HTML - IndexedDB
- HTML - Web Messaging
- HTML - Web CORS
- HTML - Web RTC
- HTML Demo
- HTML - Audio Player
- HTML - Video Player
- HTML - Web slide Desk
- HTML Tools
- HTML - Velocity Draw
- HTML - QR Code
- HTML - Modernizer
- HTML - Validation
- HTML - Color Code Builder
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
- HTML Resources
- HTML - Quick Guide
- HTML - Useful Resources
- HTML - Color Code Builder
- HTML - Online Editor
HTML - <rp> Tag
HTML <rp> tag is used to provide fallback parenthesis around a ruby text for browsers that do not support the display of ruby annotations using the <ruby> tag. This is a new tag included in HTML5. The <rp> tag must enclose the <rt> tag with parenthesis, which contains the annotation’s text.
Syntax
<rp>.....</rp>
Attribute
HTML rp tag supports Global and Event attributes of HTML.
Examples of HTML rp Tag
In the following examples we will see the use cases, where and how to use the HTML rp tag to provide fallback parenthesis around a ruby text.
Enclosing Ruby Text using rp Tag
In the following example, we are creating a ruby text enclose using the <rp> tag.
<!DOCTYPE html> <html> <head> <style> ruby { font-size: 2em; } </style> </head> <body> <ruby> 漢 <rp>(</rp> <rt>kan</rt> <rp>)</rp> 字 <rp>(</rp> <rt>ji</rt> <rp>)</rp> </ruby> </body> </html>
Styling the rp Element
Considering the following example, we are creating an HTML document using the <rp> tag and styling it with CSS properties.
<!DOCTYPE html> <html> <head> <style> body { text-align: center; } ruby { font-size: 3em; color: green; } </style> </head> <body> <h3>HTML rp Tag</h3> <ruby> 漢 <rp>(</rp> <rt>kan</rt> <rp>)</rp> 字 <rp>(</rp> <rt>ji</rt> <rp>)</rp> </ruby> </body> </html>
Applying rp tag on unsupported Ruby Annotation
Let's look at the following example, where we are going to use the <rp> element to display parenthesis to user agents that don’t support Ruby annotations.
<!DOCTYPE html> <html> <head> <style> body { text-align: center; } ruby { font-size: 2em; color: #808000; } </style> </head> <body> <h3>Example of rp tag </h3> <ruby> 漢 <rp>(</rp> <rt>かん</rt> <rp>)</rp> 字 <rp>(</rp> <rt>じ</rt> <rp>)</rp> </ruby> </body> </html>
Supported Browsers
Tag | |||||
---|---|---|---|---|---|
rp | Yes 5.0 | Yes 5.5 | Yes 38.0 | Yes 5.0 | Yes 15.0 |
To Continue Learning Please Login
Login with Google