/    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!
×

Success!

Help @makamo66 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.24,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...