How to write superscript and subscript in markdown

featured Image

In this post, we will learn how to write superscripts and subscripts in markdown.

There is no native support for superscript (sup) and subscript (sub) in markdown.

However, if you are using a markdown compiler to render the content as HTML then we can use the <sub> tag for subscript and <sup> for superscript.

Let’s see with an example.

Write superscript in markdown

To write superscript in markdown we will use the <sup> HTML tag.

This is <sup>superscript</sup> in markdown

Output:

This is superscript in markdown

Write subscript in markdown

To write subscript in markdown we can use the <sub> HTML tag.

This is <sub>subscript</sub> in markdown

Output:

This is subscript in markdown

You can also write the power of numbers in mathematical equations using HTML tags.

Write power of numbers in markdown

To write a mathematical equation with a power of number, we can use the superscript <sup> like this.

2<sup>2</sup> = 4

Output:

22 = 4

Note: You can also use the Unicode or emoji character directly on your markdown content if your OS support it.


Related Articles:

How to open markdown link in new tab

How to center align an image in markdown

How to do text highlight in markdown

How to underline in markdown

How to change image size in markdown in GitHub

How to make horizontal line in markdown

How to write comments in a Markdown File

Easy Way to add Emoji in markdown with VS Code

Related Posts

git commands with example

Top 40 Git commands with Examples

GitHub has become an essential tool for developers to manage, store, and collaborate with other developers on software projects. With its simple powerful git-based version control system, GitHub allows users…

Read more
Check GitHub Account in the Terminal

Check GitHub Account in the Terminal

GitHub is an integral tool for developers to store, manage, and collaborate on software projects with other developers. And as we work more and more in the command line it…

Read more
featured Image

How to make list of objects in Netlify CMS using list and object Widget

Here in this Netlify CMS tutorial we will how easily we can make a list of objects using list and object widgets. This will allow us to add multiple objects…

Read more

Leave a Reply

Your email address will not be published. Required fields are marked *