HTML has a tag known as <sup> which stands for superscript text. This tag properly places text half a character above the baseline.
Example:
bite size technology, design and marketing ideasSM
In order to achieve the service mark symbol as you see above, you need to align your “SM” text to the top of its line-height and decrease the font size to 50% of its original size. The following code samples will produce the service mark symbol on your web pages.
CSS code:
sup { vertical-align: text-top; font-size: 50%; }
HTML code:
bite size technology, design and marketing ideas<sup>SM</sup>
Let me know in the comments section if this code helps you, or better yet, share it with others who might need it.
6 Comments
℠ (& # 8 4 8 0 ; – no spaces)
Michael is right.
Also, the and tags should be avoided. They aren’t formally deprecated, but they should be – they describe presentation, not semantics.
CSS is for presentation. HTML is for semantics.
If you need superscripted text, wrap it in a with a meaningful class name, and set “vertical-align: super;” in your CSS file.
…that should read “the and tags should be avoided”.
Oh, holy hell. “The [sup] and [sub] tags”.
…and “wrap it in a [span] with a meaningful class name”.
Mario, perhaps you can edit the original comment, and discard these followups?
@Travis – thank you for the clarifications