选择与无线电按钮和复选框

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.

  • 当然,我在逗号之前阅读了该部分.根据*我对英语的理解*,它不能阻止你的回答被误导. (4认同)
  • 我从来没有说过要严格遵守。你正在按照你的方式行事。我说的只是建议你遵循,而不是强迫你遵循。请仔细阅读最后一条评论,它始终是一个指导方针,如果您愿意遵循,就遵循,如果您不希望遵循,就不要遵循。 (3认同)
  • *7*的限制来自哪里? (2认同)
  • 我总是提到,没有强迫,你采取了其他方式。并且不要仅仅因为您无法理解而投票否决。 (2认同)