chh*_*vey 16 html forms semantic-markup
使用包含子元素的元素和使用父元素中的元素之间的语义差异是什么?这两种方法都允许用户最多选择一个选项.唯一的区别是视觉和用户体验相关:第一种方法向用户显示下拉菜单,而另一种方法显示单选按钮.<select><option><input type="radio"><fieldset>
同样,<select multiple="">与<option>孩子(选择多个下拉菜单)和使用<input type="checkbox">(复选框)之间的区别是什么?再说一次,我看不出功能上的任何差异; 只有演示文稿
我只是想知道为什么HTML规范有两种方法供开发人员使用.如果唯一的区别在于演示和用户体验,我们不应该只使用一种方法吗?
Uma*_*hta 22
In general terminology there is no such particular difference between Radio Button and a Select List(Dropdown) but, since the screen space used is proportional to the number of options, if the number of options are between two to seven a web designer goes for using radio buttons, for eight or more options, he/she uses a drop-down list or single-selection list.
Another thing to keep in mind while designing is: If the default option is recommended for most users in most situations, radio buttons might draw more attention to the options than necessary. Consider using a drop-down list if you don't want to draw attention to the options, or you don't want to encourage users to make changes. A drop-down list focuses on the current selection, whereas radio buttons emphasize all options equally.
The same follows for the checkbox and multiselect dropdown.