Reputation: 35
Is it possible for a text input tag to take in superscript, and actually display it?
For instance, the Google calculator superscripts with exponents, that would be what I'm looking for.
Upvotes: 2
Views: 88
Reputation: 44086
Go to this &what (or just copy and paste from this post) and click the glyph directly (sometimes you'll need to click the link). Copy and pasting directly is the easiest way.
:root {
font: 400 16px/1 Consolas
}
input {
font-size: 2rem;
}
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
</head>
<body>
<input value="X ⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ⁺ ⁻ ⁼ ⁽ ⁾ ⁿ °">
</body>
</html>
Upvotes: 1