search engine optimization articles do it yourself seo hiring search engine experts html and search engine optimization web site analysis and submission service

HTML Label Tag

Browser Support

Internet Explorer Firefox Opera Safari Chrome

The 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.
Back | HTML Tag Chart | HTML Index | Web Design Tutorials
search engine optimization course
If you want your web site to rank high in the search engines . . . what are you going to do to get it there? Check out my search engine optmization guide, SEO for YOU: Search Engine Optimization for Ordinary Everyday People!

Check out SEO for YOU now!

Almost a Newsletter

Subscribe today for exclusive website design tutorials and grab some free gifts to boot! Learn more, or subcribe below:
Email:

First Name:

Privacy Policy

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 ]
See my fancy bottom! :)