HTML <sup> and <sub> Examples
Updated Jul 6, 2025
The <sup> and <sub> tags in HTML are used to display superscript (raised text) and subscript (lowered text). Superscript is commonly used in math formulas (like x<sup>2</sup>) or footnotes (like 1<sup>st</sup>), while subscript is used in chemical formulas (like H<sub>2</sub>O). These tags help format text in scientific, academic, or technical content for better readability and structure.
HTML Sub and Sup
Demo & Code<sup> & <sub>: Math Sums & Products
Demo & CodeSub/Sup Toggle
Demo & CodeSup-er Dates
Demo & Code
loading