<sub> - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:sub

Introduction

You use the sub element to mark subscripts.

subscripts are used in simple mathematical expressions.

The sub element summary

Item Value
Element sub
Local Attributes None
Tag StyleStart and end tag required
New in HTML5 No
Changes in HTML5None

Style Convention

sub {
   vertical-align: sub;
   font-size: smaller;
}

The following code shows the sub and sup elements in use.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
   <head> 
      <title>Example</title> 
   </head> 
   <body>
       The point x<!--  www .j  a va  2s .  c  om-->
      <sub>10</sub>
       is the 10
      <sup>th</sup>
       point.  
   </body>
</html>

Related Tutorials