Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

sub sup

The <sub> subscript and <sup> superscript elements are used to specify text that is smaller and positioned differently from the rest for symbol and math equation markup. The uses are numerous as the examples below demonstrate, these are just a few real world uses for these elements.

Code Example

<p> I drink H<sub>2</sub>O all day. </p> <p> E=mc<sup>2</sup> </p> <p> I was raised on 83<sup>rd</sup> Street. </p> <p> DevelopPHP<sup style="font-size:9px;">TM</sup> </p> open in code editor

Attributes

globals - the global attributes common to all elements possible values: see global attribute list

Official Documentation

http://www.w3.org/TR/html/text-level-semantics.html#the-sub-and-sup-elements

HTML

Elements

aabbraddressareaasidearticleaudiobbasebdobdiblockquotebodybrbuttoncanvascaptioncitecodecolcolgroupdatadatalistdddeldetailsdfndialogdivdldtemembedfieldsetfigcaptionfigurefooterformh1 h2 h3 h4 h5 h6headheaderhrhtmliiframeimginputinskbdkeygenlabellegendlilinkmainmapmarkmetameternavnoscriptobjectoloptgroupoptionoutputpparampreprogressqrb rp rt rtc rubyssampscriptsectionselectsmallsourcespanstrongstylesub supsummarytabletbodytdtemplatetextareatfootththeadtimetitletrtrackuulvarvideowbr