Skip to main content

Timeline for answer to What does "for" attribute do in an HTML <label> tag? by Rahul Tripathi

Current License: CC BY-SA 4.0

Post Revisions

8 events
when toggle format what by license comment
Jul 10, 2020 at 17:41 history edited Andrew Truckle CC BY-SA 4.0
added 4 characters in body
Aug 25, 2013 at 18:51 comment added Rahul Tripathi Have a look at these features:- euclidsfifth.com/development/for-attribute-used-wit-label-tags and webmasterworld.com/forum21/7407.htm
Aug 25, 2013 at 18:46 comment added Alex There are some nice features for example when you are using radio buttons. Clicking on the label will actually toggle the radio button. This is a nice feature when you try to use radio buttons with a custom ui.
Aug 25, 2013 at 18:46 comment added Rahul Tripathi @CengizFrostclaw:- A label can be bound to an element either by using the "for" attribute
Aug 25, 2013 at 18:45 comment added JJJ @CengizFrostclaw jsfiddle.net/DmSGh --- try clicking on both of the "Input here" texts and see what happens.
Aug 25, 2013 at 18:44 comment added Rahul Tripathi FOR Specifies which form element a label is bound to
Aug 25, 2013 at 18:43 comment added jeff Yes, but what do you mean by "bind them together" ? They are already neighbors in HTML structure. This is what I don't understand.
Aug 25, 2013 at 18:42 history answered Rahul Tripathi CC BY-SA 3.0