<ruby> - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:ruby

Introduction

Ruby characters are notations placed above or to the right of characters.

The ruby element marks text that contains a ruby.

The ruby Element summary

Item Value
Element ruby
Local AttributesNone
ContentsPhrasing content and rt and rp elements
Tag Style Start and end tag
New in HTML5Yes
Changes in HTML5 N/A

Style Convention

ruby { 
   text-indent: 0; 

}

You use the ruby element together with the rt and rp elements.

The rt element marks the ruby notation, and the rp element marks parentheses around an annotation that can be displayed by browsers that don't support ruby annotations.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
   <head> 
      <title>Example</title> 
   </head> 
   <body> 
      <p> 
         <ruby>
             CSS <!--from   w w  w.j a v a2 s. c  o  m-->
            <rp>(</rp>
            <rt>Styles Cascade</rt>
            <rp>)</rp>
         </ruby> 
      </p>  
   </body>
</html>

Related Tutorials