Button inside a label

后端 未结 5 1053
后悔当初
后悔当初 2021-02-12 15:20

I have a label with \"for=\"the pointer to the checkbox input\"\" and as long as I know, this for can be added only for label

5条回答
  •  南旧
    南旧 (楼主)
    2021-02-12 15:43

    It turns out you can make a

Although this contravenes the W3C specs:

The interactive element label must not appear as a descendant of the button element. https://www.w3.org/TR/html-markup/label.html

提交回复
热议问题