Pages

Friday, December 31, 2010

The Subscript Element

The Subscript <sub> Element is use to set the text as subscript in which the text is raised slightly lower. The subscript element is useful if the content you're writing is all about mathematics or chemistry.

Listed below are the most common attributes you can use for the subscript element:
  •  class - provides the class or classes of the heading. This attribute is used to identify the name of the style class or classes to be used for rendering.
  • id - provides a unique name for the heading.
  • lang - provides the language in which the enclosed content is coded.
  • style - provides a cascading style sheet (CSS) properties to the heading.
  • title - privides a text title for the heading. Most web browser displays the value of the title as "tooltip".

Here's an example on how to use the subscript element:


 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
         <meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
         <mate name="keywords" content="blog, web development" />
         <title>the SUBSCRIPT element</title>
     </head>

     <body>
       <h1>
         the SUBSCRIPT element
       </h1>
       <p>
           CHEMICAL BONDING
           <br /><br />
           Water:H<sub>2</sub>0
            <br />
            Baking soda: NaHCO<sub>3</sub>
            <br />
            Calcium hydroxide: Ca(0H)<sub>2</sub>
        </p>
   </body>
</html>

0 comments:

Post a Comment