|Home | Web Design Tutorials | Free Graphics | Newsletter | Products | Specials | SEO | Sound Effects | Member Perks | Member Login|
HTML Label Tag
Browser SupportThe label tag defines a label for a form input element. It allows users to click the text by an input widget to activate it.
This can be handy for people with motor impairment and have difficulty controlling a mouse with precision.
Here's an example of usage:Click on the text beside the radio buttons instead of on the radio buttons and watch the button activate anyway. Neat, eh?
Here's the code:
<form> <label for="Vanilla">Vanilla</label> <input type="radio" name="Fave Ice Cream" id="Vanilla" /> <br /> <label for="Chocolate">Chocolate</label> <input type="radio" name="Fave Ice Cream" id="Chocolate" /> </form>
The value of the for attribute should be exactly the same as the value of the id attribute of the related input element to connect them together.
This concludes the HTML Label Tutorial.
Check out SEO for YOU now!
Almost a NewsletterSubscribe today for exclusive website design tutorials and grab some free gifts to boot! Learn more, or subcribe below:
Did you know...The member's site has about 100 standards compliant HTML and CSS tutorials, 31 handy reference charts, reprintable content, web graphics, exclusive fonts, free software, free ebooks and more? All this for less than 9 cents a day! [ Details ]
Home | Web Design Tutorials | Free Graphics | Newsletter | Products | Specials | SEO | Sound Effects