Switch to full style
HTML code examples
Post a reply

Control font size of sub and sup text

Sat Feb 25, 2012 1:45 pm

In this example we change the size of sub and sup tags text using CSS properties.

Code:
<html xmlns "http://www.w3.org/1999/xhtml">
   <
head>
   <
title>
    
Control font size of sub and sup text
   
</title>
   <
style type="text/css" media="Screen">
sub {
  
vertical-align: -0.6em;
  
font-size0.6em;
}

sup {
  
vertical-align0.6em;
  
font-size0.6em;
}

 
</
style>
   </
head>
     <
pusing sup tag example</p>
   <
body>
      <
pPower of X
      
X<sup>1</sup>, X<sup>2</sup>,... X<sup>n</sup>, 
        <
br/>
         
Show power of numbers 
      </
p>
      <
pData set population :  
      
X<sub>1</sub>, X<sub>2</sub>,... X<sub>n</sub>, 
        <
br/>
         
mark each sample 
      
</p>
   </
body>
</
html>
 




Post a reply
  Related Posts  to : Control font size of sub and sup text
 change font size in JavaScript     -  
 chainge Font size of drawing     -  
 change Font of text in java     -  
 Set image size as a percentage of the page size     -  
 Able to Copy Text from Uneditable Text Boxes(JTextfields)     -  
 CSS used font families     -  
 Outlining the font in java     -  
 Change the td font style     -  
 change the font style of the body tag     -  
 Configuring the header html font     -  

Topic Tags

HTML Font