HTML5 | <ruby> Tag

The <ruby> tag in HTML is used to specify the ruby annotation which is a small text, attached with the main text to specify the meaning of the main text. This kind of annotation is used in Japanese publications.

Syntax:

<ruby attributes> Contents... </ruby>

Note: <ruby> tag contains two other tags which are listed below:

  • <rt> tag: It is used to describe the explanation of main text on top of the main text.
  • <rp> tag: It is optional which is used to specify the information which need to show when browsers are not support ruby annotations.

Example:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html> 
<html
    <head
        <title>ruby tag</title>
        <style>
            body {
                text-align:center;
            }
            h1 {
                color:green;
            }
        </style>
    </head
    <body
        <h1>GeeksforGeeks</h1>
        <h2><ruby> Tag</h2>
        <ruby>GFG<rt>GeeksforGeeks</rt></ruby>
    </body
</html>                                                 

chevron_right


Output:

Supported Browsers: The browser supported by <ruby> tag are listed below:

  • Safari 5.0
  • Google Chrome 5.0
  • Firefox 38.0
  • Opera 15.0
  • Internet Explorer 5.5


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :
Practice Tags :


1


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.