Superscript () and Subscript () html tag

Superscript (<sup>) and Subscript (<sub>) html tag

In HTML web development, superscript <sup> and subscript <sub> tags are used in HTML webpages where superscript text displays small superscript text above general HTML text and particular subscript text information is displayed below simple HTML text. Superscript and subscript tags are used in HTML webpages to display mathematical numerical expressions, formulas, chemical formulas, engineering formulas, and other web content information in small font size in top or bottom order, where you can display superscript and subscript text above or below simple webpage text.

Superscript () and Subscript () html tag

HTML Superscript (<sup>) Tag.

In HTML web pages, particular paragraph text is displayed in a superscript tag to indicate the desired text in a smaller format, the superscript tag previews a slightly smaller font size than the general HTML tag, and the superscript text in an HTML paragraph previews above the general HTML text line.

Superscript tag examples in HTML.

<html lang=”en”>

<head>

    <meta charset=”UTF-8″>

    <meta name=”viewport” content=”width=device-width, initial-scale=1.0″>

    <title>Html Superscript Tag Example</title>

</head>

<body>

    <p>Pythagoras Theorem – a<sup>2</sup> + b<sup>2</sup> = <sup></sup></sup>c<sup>2</sup></p>

    <p>Abc Complex<sup>1</sup> Floor</p>

    <p>All Right Reserved<sup>©</sup> By vcanhelpsu.com</p>

</body>

</html>

HTML subscript (<sub>) tag.

In HTML web pages, particular text information is displayed in a subscript text format, the subscript tag previews a slightly smaller font size than the general HTML tag, and the superscript text in an HTML web page previews below the general HTML text line.

HTML subscript tag text examples.

<!DOCTYPE html>

<html lang=”en”>

<head>

    <meta charset=”UTF-8″>

    <meta name=”viewport” content=”width=device-width, initial-scale=1.0″>

    <title>Html Subscript Tag Example</title>

</head>

<body>

    <p>Engineering Formula – H<sub>2</sub>O</p>

    <p>Engineering Formula – Ch<sub>2</sub>Ho<sub>4</sub></p>

</body>

</html>

HTML web page group examples of superscript text and subscript text.

If you want, you can use both superscript and subscript tags at the same time in a single HTML web page example.

Examples of superscript and subscript in HTML web pages.

<!DOCTYPE html>

<html lang=”en”>

<head>

    <meta charset=”UTF-8″>

    <meta name=”viewport” content=”width=device-width, initial-scale=1.0″>

    <title>Html Group Superscript and Subscript Tag Example</title>

</head>

<body>

    <p>Superscript and Subscript example – x<sup>2</sup> + y<sup>2</sup></p>

    <p>Mathematical Formula Superscript text – E = mc<sup>2</sup> Subscript text – H <sub>2</sub>O</p>

</body>

</html>

About superscript and subscript tags in HTML.

  • HTML text formatting – <sup> and <sub> are inline text tags used to preview paragraph text in small font size in HTML web pages, which means they are previewed in their default order without restricting other HTML tag elements.
  • User accessibility – Sometimes web developers provide special viewing formats for superscript <sup> and subscript <sub> text in an HTML web page. Superscript and subscript tags are used to preview paragraph text in particular situations, special text information, formulas, etc.