<LABEL> | NN n/a IE 4 HTML 4 | ||
<LABEL>...</LABEL> | End Tag: Required | ||
The LABEL element defines a structure and container for the label associated with an INPUT element. Because the rendered labels for most form controls are not part of the element's tag, the LABEL attribute provides a way for a browser to clearly link label content to the control. You have two ways to provide the association. One is to assign the ID attribute value of the control to the FOR attribute of the LABEL element. The other is to wrap the INPUT element inside a LABEL element. The latter is possible only if the label and control are part of running body content; if you must physically separate the label from the control because they exist inside separate TD elements of a table, you must use the FOR attribute linkage. Whether the label is rendered in front of or after the control depends entirely on the relative locations of the tags in the source code. A future application for this element is for text-to-speech browsers reading aloud the label for a control. | |||
Example
<FORM> <LABEL>Company:<INPUT TYPE="text" NAME="company"></LABEL><BR> <LABEL FOR="stateEntry">State:</LABEL> <INPUT TYPE="text" NAME="state" ID="stateEntry"> ... </FORM> | |||
Object Model Reference
|
ACCESSKEY | NN n/a IE 4 HTML 4 | ||
ACCESSKEY=" | Optional | ||
A single character key that brings focus to the associated
INPUT element. The browser and operating system
determine if the user must press a modifier key (e.g., | |||
Example
<LABEL FOR="stateEntry" ACCESSKEY="s">State:</LABEL> | |||
Value Single character of the document set. | |||
| |||
Object Model Reference
|
DATAFLD | NN n/a IE 4 HTML n/a | ||
DATAFLD=" | Optional | ||
Used with IE 4 data binding to associate a remote data source column name with the label of an INPUT element. The data source column must be either plain text or HTML (see DATAFORMATAS). A DATASRC attribute must also be set for the LABEL element. | |||
Example
<LABEL FOR="stateEntry" DATASRC="#DBSRC3" DATAFLD="label" DATAFORMATAS="HTML"> State:</LABEL> | |||
Value Case-sensitive identifier. | |||
| |||
Object Model Reference
|
DATAFORMATAS | NN n/a IE 4 HTML n/a | ||
DATAFORMATAS=" | Optional | ||
Used with IE 4 data binding, this attribute advises the browser whether the source material arriving from the data source is to be treated as plain text or as tagged HTML. This attribute setting depends entirely on how the data source is constructed. | |||
Example
<LABEL FOR="stateEntry" DATASRC="#DBSRC3" DATAFLD="label" DATAFORMATAS="HTML"> State:</LABEL> | |||
Value IE 4 recognizes two possible settings: text | HTML. | |||
| |||
Object Model Reference
|
DATASRC | NN n/a IE 4 HTML n/a | ||
DATASRC=" | Optional | ||
Used with IE 4 data binding to specify the name of the remote ODBC data source (such as an Oracle or SQL Server database) to be associated with the element. Content from the data source is specified via the DATAFLD attribute. | |||
Example
<LABEL FOR="stateEntry" DATASRC="#DBSRC3" DATAFLD="label" DATAFORMATAS="HTML"> State:</LABEL> | |||
Value Case-sensitive identifier. | |||
| |||
Object Model Reference
|
FOR | NN n/a IE 4 HTML 4 | ||
FOR=" | Optional | ||
A unique identifier that is also assigned to the ID attribute of the INPUT element to which the label is to be associated. The FOR attribute is necessary only when you elect not to wrap the INPUT element inside the LABEL element, in which case the FOR attribute performs the binding between the two elements. | |||
Example
<LABEL FOR="stateEntry">State:</LABEL> | |||
Value Case-sensitive identifier. | |||
| |||
Object Model Reference
|
TABINDEX | NN n/a IE n/a HTML 4 | ||
TABINDEX=integer | Optional | ||
A number that indicates the sequence of this element within the tabbing order of all focusable elements in the document. Tabbing order follows a strict set of rules. Elements that have values other than zero assigned to their TABINDEX attributes are first in line when a user starts tabbing in a page. Focus starts with the element with the lowest TABINDEX value and proceeds in order to the highest value, regardless of physical location on the page or in the document. If two elements have the same TABINDEX values, the element that comes earlier in the document receives focus first. Next come all elements that either don't support the TABINDEX attribute or have the value set to zero. These elements receive focus in the order in which they appear in the document. Although this attribute is not yet implemented in browsers, the expected behavior is that when a LABEL element receives focus, the focus shifts automatically to the associated INPUT element. | |||
Example
<LABEL FOR="stateEntry" TABINDEX=3>State:</LABEL> | |||
Value Any integer from 0 through 32767. | |||
|