/    Sign up×
Community /Pin to ProfileBookmark

Writing a chemical formula without using MathML

I want to write a chemical formula without using MathML. The subscript is showing up in the right place but the superscript is too far to the left of the symbol U for Uranium.

`<sup>235</sup><sub>92</sub>U`

The number on top is the mass number and the number on the bottom is the atomic number.

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@NogDogSep 19.2021 — I think in part it may depend on what browser and what font you use. When I tried it in Firefox, it seemed pretty close to me, while in Chrome there was seemingly a tiny bit more space; so you may want to try some cross-browser/device testing before settling on any solution. As far as a solution, you could try messing with the margin a bit, e.g.:
[code=html]
<!DOCTYPE html>
<html>
<head>
<style>
.atomic_weight {
margin-right: -0.1em;
}
</style>
</head>
<body>
<p><sup class='atomic_weight'>235</sup><sub>92</sub>U</p>
</body>
</html>
[/code]
Copy linkTweet thisAlerts:
@JabajabaSep 20.2021 — @NogDog#1637230 That's a great idea!