Reputation: 111
How can I format a typical Input with type="button"
to display content text having a subscript format?
Example: O2
Upvotes: 0
Views: 1096
Reputation: 943571
For that particular example you could just use Unicode code point U+2082:
<input type="button" value="O₂">
… but in the general case the solution is stop using an input. HTML 4 introduced the <button>
element to replace the submit, button and reset types.
<button>
has two main advantages:
<button type="button"> O<sub>2</sub> </button>
Upvotes: 1