Making Superscripts and Subscripts

  • 28 January 2022
  • 1 reply
  • 31 views

Userlevel 7
Badge +5

I did not see an easy way to do this within the platform using the text editor so I thought I would offer this little nugget for those who need to do these sorts of things.

 

 

In the image above, you can see two examples of where a subscript and a superscript would be used.

To get this look, you would need to use the code editor by selecting the  < >  icon on your menu bar.

For subscripts, surround the text you wish to have slightly lowered between the “sub tags”.

<sub>6</sub>

For superscripts, surround the text you wish to have slightly raised between the “sup tags”.

<sup>2</sup>

 

Here is how the code looks for what you see above.

Note that I added a little extra styling which would not be required.

<!-- HTML code for the subscripts -->

<div style="font-family:'Courier New'; font-size:24px; padding:10px;">
Glucose: C<sub>6</sub>H<sub>12</sub>O<sub>6</sub>
</div>


<!-- HTML code for the superscripts -->

<div style="font-family:'Courier New'; font-size:24px; padding:10px;">
Pythagorean Theorem: a<sup>2</sup> + b<sup>2</sup> = c<sup>2</sup>
</div>

 

I made this an idea as well so hopefully the functionality will be added one day and this helps someone do what they need to in the meantime.

 

 


1 reply

Userlevel 7
Badge +3

This is great. Thank you for sharing @gstager!

Reply