Reputation: 11493
I want to display some chemistry equations like 23Na40K (source).
This value is in my database. Now it's display like this $^{23}$Na$^{40}$K
. I tried to use html_entity_decode()
, utf8_decode()
, stripslashes()
. Nothing works for me. Please help me to resolve this.
Upvotes: 0
Views: 134
Reputation: 164
I havent seen anyone mention these:
¹²³⁴⁵⁶⁷⁸⁹⁰
Which are some Unicode Characters which don't look as good as the Superscript Tags but, if you still want to use HTML entities here they are:
¹²³⁴⁵⁶⁷⁸⁹⁰
Heres a comparison
HTML Tags: <sup>23</sup>Na<sup>40</sup>K
<br>Or<br>
HTML Entities: ²³Na⁴⁰K
Upvotes: 0
Reputation:
You can use an Equation HTML generator and use it into your website.
Or, you can also use Latex for displaying full equation html.
Upvotes: 0
Reputation: 4925
This can be done with Superscript
in HTML like this:
Output: 23Na40K
<sup>23</sup>Na<sup>40</sup>K
Upvotes: 0