Question: Complete amateur here. I am working on a little personal project and need to be able to put numbers **directly over** over certain letters like this:

[![enter image description here](https://i.stack.imgur.com/MD11v.png)](https://i.stack.imgur.com/MD11v.png)

My current method is to just embed the equations as jpegs, but would like to know if there is a better way to do this (preferably, but not necessarily, in pure HTML)? (Hopefully something like the /above function on Microsoft word) Thank you for your help.

Answer: 
Use the superscript and subscript tags.

```css
sup {
  left: -.5em;
  top: -.5em;
  margin-left: -1em;
  position: relative;
}
```

```html
K<sub>2</sub>Cr<sub>2</sub><sup>+6</sup>O<sub>7</sub>
```

Are you looking for something like this? It may require some fine-tuning based on the exact formula you are trying to represent, but I think it works as a proof-of-concept.
I don't know if you can with HTML only, but there is [mathJax](https://www.mathjax.org/) which is

> 
> a JavaScript display engine for mathematics that works in all browsers.
> 
> 
>