Using the HTML 'label' tag with radio buttons

前端 未结 7 535
暗喜
暗喜 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-28 12:51

    You can't declare a label for a set of buttons, but for each button. In this case, the labels are "Mr.", "Mrs." and "Miss", not "Salutation".

    UPDATE
    Maybe you should just use another tag for this "label" of yours - since it's not really a label.

    
        Activity:
         
        
        [... and so on]
    
    

提交回复
热议问题