How do I get superscript and subscript text in alt attribute? Do I use entities?

The text is about chemical formulas.