Two input fields inside one label

前端 未结 7 1280
忘了有多久
忘了有多久 2020-12-03 04:25

Consider the following:


7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-03 05:12

    No, it's not correct (since, as you note, a label is associated with exactly one form input).

    To label a group of inputs that belong together, use a

    and a :

    Range

    References:

    • HTML 5 spec, WHATWG definition.
    • HTML 5 spec, WHATWG definition.
    • HTML 5 spec, WHATWG definition.

提交回复
热议问题