Superscript and Subscript (<sup>, <sub>)

1
8KB

Superscript is used to display text above the baseline, while subscript is used to display text below the baseline. In HTML, these effects can be achieved using the <sup> and <sub> elements, respectively.

Superscript: <sup>

Example:

HTML
<p>H<sub>2</sub>O is the chemical formula for water.</p>
<p>2<sup>3</sup> equals 8.</p>

Subscript: <sub>

Example:

HTML
<p>H<sub>2</sub>O is the chemical formula for water.</p>
<p>2<sub>3</sub> is not a common mathematical notation.</p>

Note:

  • Both <sup> and <sub> are primarily used for presentation purposes and don't convey any specific semantic meaning.
  • They are often used for mathematical formulas, chemical notation, and other specialized content.

Additional Considerations:

  • You can combine superscript and subscript within the same element.
  • For more complex mathematical expressions, consider using LaTeX or specialized mathematical notation tools.

By using <sup> and <sub>, you can effectively display superscript and subscript text in your HTML documents, enhancing the readability and accuracy of content that requires these formatting elements.

Like
3
Rechercher
Catégories
Lire la suite
Physics
SEPTA-O-LEVEL PHYSICS SEMINAR SLATED FOR 23RD JUNE 2024 AT ST. JOSEPH OF NAZARETH HIGH SCHOOL KAVULE-KATENDE
https://acrobat.adobe.com/id/urn:aaid:sc:EU:39c1aa82-237a-43bf-ba1a-fbe5223d26f1
Par Question Bank 2024-07-14 19:52:41 2 13KB
Technology
INDEX and MATCH Functions
The combination of INDEX and MATCH functions in Excel is a powerful way to perform lookups. This...
Par Microsoft Excel Tips 2024-10-16 01:02:42 0 13KB
Physics
MATIGO PHYSICS PAPER 1 2024
MATIGO UACE PHYSICS PAPER 1 2024
Par Question Bank 2024-09-05 17:26:27 0 12KB
Computer Programming
Dynamic Typing, Stubs, and Namespaces in Python
Here's a breakdown of these three concepts in Python: 1. Dynamic Typing: Python is a...
Tebtalks https://tebtalks.com