
: How do you use a font-family's special features inside html? How do you use a font-family's symbols, glyphs, ornaments and other features inside? For example how do you use a font's superscript?
How do you use a font-family's symbols, glyphs, ornaments and other features inside? For example how do you use a font's superscript?
More posts by @Looi9037786
1 Comments
Sorted by latest first Latest Oldest Best
You are after two different things
You insert special characters e.g copyright, accented letters, by using HTML entities e.g. © or © for ©. Here is a list www.freeformatter.com/html-entities.html
To achieve superscript, it has nothing to do with entities.
In this case it is the size and placement of text.
Your HTML would look like this
<p>H<span class="atoms">2</span>SO<span class="atoms">4</span> is the chemical formula for sulphuric acid.
But how is this gold Au<span class="charge">2+</span>?</p>
the CSS would be
p { line-height: 1.5 }
.charge {
position: relative;
bottom: 0.5em;
color: red;
font-size: 0.8em;
}
.atoms {
position: relative;
top: 0.3em;
color: blue;
font-size: 0.8em;
}
This example comes from htmldog.com/techniques/superscript/ see it in action here htmldog.com/examples/superscript/
I have no association with either of the pages.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.