HTML Tag Reference - HTML tag








This element defines text that is accompanied by a notation above or below the text. It is used in conjunction with the <rt> element, with the text specified before <rt> considered the base text, and the text following <rt> considered the notation.

The <span> element can be used to set the formatting of each part of the element.

Browser compatibility

<ruby> Yes Yes No Yes Yes




What's new in HTML5

The <ruby> tag is new in HTML5.

Global Attributes

The <ruby> tag supports the Global Attributes in HTML.

Event Attributes

The <ruby> tag supports the Event Attributes in HTML.

Example

A demo showing how to use <ruby> tag.

<html>
<body>
     <ruby>
          This is the base text.<!--from  www.  j  a  va  2 s . com-->
         <rt>
             This is the ruby text
         </rt> 
     </ruby>
</body>
</html>

Click to view the demo