Why label element is used and also for attribute? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Why label element is used and also for attribute?

What is the use of label element and for attribute?

14th Jun 2020, 12:41 PM
Even Dead I Am The Hero.
Even Dead I Am The Hero. - avatar
2 Answers
+ 3
You can google it :-)
14th Jun 2020, 12:47 PM
Abhay
Abhay - avatar
+ 2
First point to be noted that without label tag if you will click on the particular input then only your actions will take place .and if you used label tag then clicked on label text will also trigger the action ok . It's very very good to use it in the case of radio and check box . Do the prectical for your self
14th Jun 2020, 2:09 PM
Ayush Kumar
Ayush Kumar - avatar