How can I use <sup></sup> in <option></option> in Html

半城伤御伤魂 提交于 2020-08-19 06:26:12

问题


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>

回答1:


You can't use another tag inside options tag. But you can do something like:

<select>
 <option>&sup1;</option>
 <option>&sup2;</option>
 <option>&sup3;</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



来源:https://stackoverflow.com/questions/31553810/how-can-i-use-sup-sup-in-option-option-in-html

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!