<p>The <strong class=html>LABEL</strong> element <em>associates a label with a form control</em>. By associating labels with form controls, authors give important hints to users of speech browsers while also allowing visual browsers to duplicate common <acronym title="Graphical User Interface">GUI</acronym> features (<abbr title="for example"><i lang=la>e.g.</i></abbr>, the ability to click on a text label to select a radio button or checkbox).</p>
<p>Each <strong class=html>LABEL</strong> element is associated with exactly one form control. The element's content is the label of the form control and may include <a href="../inline.html">inline elements</a> such as <strong class=html><a href="../special/img.html">IMG</a></strong> and <strong class=html><a href="../phrase/strong.html">STRONG</a></strong>.</p>
<p>The <strong class=html>FOR</strong> attribute explicitly specifies the control associated with the <strong class=html>LABEL</strong>. The value of the <strong class=html>FOR</strong> attribute must match the value of the associated form control's <strong class=html><a href="../attrs.html#id">ID</a></strong> attribute. In the absence of the <strong class=html>FOR</strong> attribute, the <strong class=html>LABEL</strong> must contain the associated form control. This method of implicit association is convenient in many cases, but not an option when the form control and its label are in different table cells, paragraphs, or divisions. The following example illustrates both explicit and implicit label associations:</p>
<p>The <strong class=html>ACCESSKEY</strong> attribute, used throughout the preceding example, specifies a single Unicode character as a shortcut key for giving focus to the <strong class=html>LABEL</strong>, which passes the focus on to the associated form control. <a href="../entities/index.html">Entities</a> (<abbr title="for example"><i lang=la>e.g.</i></abbr> <strong class=html>é</strong>) may be used as the <strong class=html>ACCESSKEY</strong> value.</p>
<p>The <strong class=html>LABEL</strong> element also takes a number of attributes to specify client-side scripting actions for various events. In addition to the <a href="../attrs.html#events">core events</a> common to most elements, <strong class=html>LABEL</strong> accepts the following event attributes:</p>
<ul>
<li><strong class=html>ONFOCUS</strong>, when the element receives focus;</li>
<li><strong class=html>ONBLUR</strong>, when the element loses focus.</li>
</ul>
<h2>More Information</h2>
<ul>
<li><a href="http://www.w3.org/TR/REC-html40/interact/forms.html#edef-LABEL">LABEL in <abbr class=initialism title="World Wide Web Consortium">W3C</abbr> HTMLá4.0 Recommendation</a></li>
</ul>
<div class=footer>
<address>Maintained by <a href="http://www.htmlhelp.com/%7Eliam/">Liam Quinn</a> <<a href="mailto:liam@htmlhelp.com">liam@htmlhelp.com</a>></address>