1 Hour SEO : Domain Registration Bank : Ecommerce Dictionary : GoDefy : HTML HTML
JavaScript 2 : Jumbo Keyword : Marketing Tips Store : Michael Wong Blog : Mike's Marketing Tools
Search Engines 2 : SEO eBook : Text Links Ads : Text Links Guide
 
Web Great-Web-Design-Tips.com

You are here > Web Design > Web Accessibility > 35.1. Labels

Labels

Improve the accessibility of forms by using the <LABEL> element to specify labels for each field in a form.

In the first example, the <LABEL> tag is used before each field, and references the field's name:

<FORM action="script-reference here" method="post">
<LABEL for="name">Name:</LABEL>
<INPUT type="text" name="name">
<LABEL for="address">Address:</LABEL>
<INPUT type="text" name="address">
<LABEL for="message">Message:</LABEL>
<TEXTAREA name="message" cols="40" rows="5"></TEXTAREA>
<INPUT type="submit" value="Submit Form">
<INPUT type="reset" value="Clear Form">
</FORM>

In the second example, the <LABEL> tag surrounds each of the form fields:

<FORM action="script-reference here" method="post">
<LABEL>Name:<INPUT type="text" name="name"></LABEL>
<LABEL>Address:<INPUT type="text" name="address"></LABEL>
<LABEL>Message: <TEXTAREA name="message" cols="40" rows="5"></TEXTAREA></LABEL><br>
<INPUT type="submit" value="Submit Form">
<INPUT type="reset" value="Clear form">
</FORM>

Tab Order >>>

          

Copyright © 2002-10 Art Dacor USA LLC. All Rights Reserved.
3727 West Magnolia Blvd #489, Burbank, CA, 91505, USA.
www.Great-Web-Design-Tips.com