how to code some atom's atomic number and atomic mass number


how to code some atom's atomic number and atomic mass number



I want to know how to code some atom's atomic number and atomic mass number in line
also I tried this


<sup>35</sup><sub>17</sub>Cl



It is like this I tried



But I want like this Chlorine




1 Answer
1



Avoid using the sup and sub tags.
Use the following CSS rules instead:



HTML:


<p><span class="atoms">17</span>Cl</p>



CSS:


p { line-height: 1.5 }

.atoms {
position: relative;
top: 0.3em;
color: blue;
font-size: 0.8em;
}



Edit: You can do something similar for mass number.
HTML:


<p><span class="mass">35</span><span
class="atoms">17</span>Cl</p>



CSS:


.mass{
position: relative;
bottom:0.7em;
left:1em;
color:blue;
font-size:0.8em;
}






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Extract Id from Twitch Clip URL

Why are these constructs (using ++) undefined behavior in C?

I'm Still Waiting (Diana Ross song)