Superscript Text In Html
Solution 2:
Or with CSS:
HTML
<button class="tradeMark"type="submit">someText with</button>
CSS
.tradeMark:after{
content: ' ©';
font-size:xx-small;
vertical-align:top;
}
EDIT: this solution too won't work with <input type="submit"/>
, cause :after and :before are not applied...
Solution 3:
If you must use <input type=submit>
and not <button type=submit>
, you are out of luck. The text must be specified in the value
attribute, which is taken as plain text. You could use superscript characters like “²” there, but there is more superscript version of “®” as a character – but its appearance varies greatly across fonts, being much more superscript in some fonts than e.g. in Arial.
So the practical move might be to specify a different font for the button. For consistency, you would then probably want to use that same font for all submit button texts, e.g.
input[type=submit] { font-family: Calibri; }
Usual CSS Caveats apply. In particular, it can be difficult to specify a good list of font families in this context. (Calibri is great, but its availability is far from universal.)
Post a Comment for "Superscript Text In Html "