Using the HTML 'label' tag with radio buttons

前端 未结 7 536
暗喜
暗喜 2020-12-28 12:07

Does the label tag work with radio buttons? If so, how do you use it? I have a form that displays like this:

First Name: (text field)
Hair Col         


        
7条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-28 12:51

    Ah yes. Here’s how it works.

    labels individual fields, hence each gets its own .

    To label a group of fields (e.g. several radio buttons that share the same name), you use a

    tag with a element.

    Salutation

提交回复
热议问题