Learn HTML Code Tutorial Reference Guide

<LABEL ...>

  • FOR: form element for which this is a label

<LABEL ...>, an HTML 4.0 element supported by MSIE and Netscape 6, defines a set of text that is associated with a particular form element. For example, this code indicates that the phrase "send more information" is associated with the moreinfo checkbox because the checkbox is within the <LABEL ...> element:

this code produces this
<LABEL FOR="moreinfo">
send more information 
<INPUT NAME="moreinfo" TYPE=CHECKBOX ID="moreinfo">
</LABEL>

The FOR attribute is required. The value of FOR should be the same as the value of ID in the form field that the label applies to.

You can also associate a <LABEL ...> with a field that is not within its contents. See the FOR attribute.

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial