Today’s post is short – but since I had to hunt a bit to find out how to superscript in WordPress, I thought I’d put it here for you. One of my clients needed a trademark symbol displayed frequently on their site. Simple enough, but the WordPress default user interface doesn’t offer that feature. So how would I, for example, display Outcome MarketingTM?
Superscript in WordPress
Simple enough – to display Superscript in WordPress, you just add a < sup > code before the text in your HTML editor, and a < /sup > code after it. I added extra spaces so those codes wouldn’t mess up my text display, so see this image if what I mean isn’t clear:
Subscript in WordPress
If, for example, I wanted to display a subscript in WordPress instead, using a dropped character such as you’d see in H2O, I simply need to use the < sub > and < /sub > codes (remove the spaces from inside the codes).
What if That Doesn’t Work?
Of course, like all things computer, sometimes you don’t get the results you expect. It may vary depending on the Theme you’re using, and changing Themes could impact your results. In that case, you may have to use a slightly more complex example of code.
Trademark< span style=”vertical-align:super;” >TM</span > would give you TrademarkTM
If you want to get a little fancier, you can even adjust the size of the text which is superscripted by using a variation that allows you to set a percentage on the size of the superscript:
< span style=”font-size:PERCENTAGE HERE;vertical-align:super;”>TEXT HERE</span >
So I could use Trademark< span style=”font-size:50%;vertical-align:super;” >TM</span > to get TrademarkTM
Looks good, doesn’t it? That should work no matter what Theme you’re using, so is probably the safest and most attractive method to superscript in WordPress. If you change the “super” part of the code to “sub”, you’ll subscript instead. Please post if you have any questions, and subscribe so you don’t miss useful WordPress tips!