Forum Moderators: open

Message Too Old, No Replies

<label> Tag and Radio Buttons

eh? - what's going on 'ere then?

         

Nick_W

9:06 pm on Sep 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So,

How does one use the <label> tag with radio buttons?

If you have 3 choices for question, you can't have 3 id's can you. So how does it work and what would make those radios accessible?

Many thanks

Nick

Reflection

11:39 pm on Sep 24, 2003 (gmt 0)

10+ Year Member



I think you keep the 'name' the same but you give each radio button a unique id, so...

<label for="radio1">label</label> <input type="radio" name="radios" id="radio1" value="value1">
<label for="radio2">label</label> <input type="radio" name="radios" id="radio2" value="value2">
<label for="radio3">label</label> <input type="radio" name="radios" id="radio3" value="value3">

Nick_W

8:23 am on Sep 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ahhhh.....

Obvious once pointed out ;)

Thanks...

Nick