I have code as this :
<select>
<option>1</option>
<option>2</option>
<option>3</option>
</select>
can i use like this ?
<select>
<option><sup>1</sup></option>
<option><sup>2</sup></option>
<option><sup>2</sup></option>
</select>
The <sup> tag defines superscript text. Superscript text appears half a character above the normal line, and is sometimes rendered in a smaller font. Superscript text can be used for footnotes, like WWW. Tip: Use the <sub> tag to define subscript text.
No, you can't do this. <option> tags cannot contain any other tags. In Chrome at least, <option> tags can contain <script> tags.
Subscript text can be used for chemical formulas, like H2O to be written as H2O. Superscript: The <sup> tag is used to add a superscript text to the HTML document. The <sup> tag defines the superscript text. Superscript text appears half a character above the normal line and is sometimes rendered in a smaller font.
An id on an <option> tag assigns an identifier to the element. The identifier must be unique across the page.
You can't use another tag inside options tag. But you can do something like:
<select>
<option>¹</option>
<option>²</option>
<option>³</option>
</select>
This &sub1
, &sub2
, &sub3
is only possible for 1, 2 and 3.
You can write other numbers using codes from here: Superscript Chart
Or you can use this website to get the unicodes of alphabets: Unicode Character Search
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With