Your Guide to Professional
Web Site Design and Development

HTML Tips
HTML Codes
Web Development
Web Design Tips
JavaScript Codes
216 Web Safe Colors
CSS Tutorial
JavaScript Tutorial
ASCII Character Codes

Offering a guide to professional web site design, web page design and web design guidelines

| Web Site Development | HTML Codes | HTML Tips | Web Design TipsJavascript Snippets | 216 Safe Colors | Symbols | CSS Tutorial | JavaScript Tutorial |

Superscript and Subscript


You can vertically align your text within a web page.

Superscript Example

3102

Place the following code before the text you would like to align:

<span style="vertical-align: 30%;">3x102</span>

Edit the text in bold to suit your needs.

Place the following code after the text you would like to align:

</span>


Subscript Example

C6H12O6

Place the following code before the text you would like to align:

<span style="vertical-align: 30%;">C6H12O6</span>

Edit the text in bold to suit your needs.

Place the following code after the text you would like to align:

</span>

The percentage specifies a percentage of the distance to the line height above or below the normal line height. It raises or lowers the baseline by a percentage of the line-height to the next line. For example, a value of 50% will raise the baseline to halfway between the normal baseline and the baseline of the line above. A value of -100% will lower the baseline to the same height as the baseline of the line below. 30% or -30% looks about right for things like scientific notation.


Code provided by:

John Nitkowski

 

 More Web Design Tips