<LEGEND>NN n/a   IE 4   HTML 4
<LEGEND>...</LEGEND>End Tag: Required
 

The LEGEND element acts as a label for a FIELDSET element. In visual browsers, this usually means that the label is visually associated with the group border rendered for the FIELDSET element. Internet Explorer 4 builds the LEGEND element into the FIELDSET border. A text-to-speech browser might read the label aloud as a user navigates through a form. In Internet Explorer, the LEGEND element must come immediately after the start tag of the FIELDSET element for the association to stick. Because the content of the LEGEND element is HTML content, you can assign styles to make the label stand out, if you like.

 
Example
<FORM METHOD=POST ACTION="...">
<FIELDSET>
<LEGEND>Credit Card Information</LEGEND>
...inputElementsHere...
</FIELDSET>
</FORM>
 
Object Model Reference
IE [window.]document.all.elementID
ACCESSKEYNN n/a   IE n/a   HTML 4
ACCESSKEY="character"Optional
 

A single character key that brings focus to the first focusable control of the form associated with the LEGEND element. The browser and operating system determine if the user must press a modifier key (e.g., Ctrl, Alt, or Command) with the access key to bring focus to the element. In IE 4/Windows, the Alt key is required, and the key is not case sensitive. This attribute does not work in IE 4/Mac.

 
Example
<LEGEND ACCESSKEY="c">Credit Card Information</LEGEND>
 
Value
Single character of the document set.
 
Default None.
ALIGNNN n/a   IE 4   HTML 4
ALIGN="where"Optional
 

Controls the alignment of the LEGEND element with respect to the containing FIELDSET element. The permissible values do not always work as planned in Internet Explorer 4. For example, the bottom value displays the label at the top left of the fieldset rectangle--so does the top value, although it is supposed to be centered along the top. The other values (center, left, and right) work as expected, but on the Macintosh, the center and right settings inexplicably widen the fieldset rectangle. Be sure to check your desired setting on both operating system platforms.

The ALIGN attribute is deprecated in HTML 4.0 in favor of style sheets. But even a style sheet won't position a label along the bottom of a fieldset in Internet Explorer 4.

 
Example
<LEGEND ALIGN="right">Credit Card Information</LEGEND>
 
Value
Allowed values in HTML 4.0 are bottom | left | right | top. IE 4 adds center.
 
Default left
 
Object Model Reference
IE [window.]document.all.elementID.align
TITLENN n/a   IE 4   HTML 4
TITLE="advisoryText"Optional
 

An advisory description of the element. In Internet Explorer 4, the title is rendered as a tooltip when the cursor rests on the element for a moment. The TITLE attribute of a LEGEND overrides the TITLE setting for the entire FIELDSET.

 
Example
<LEGEND TITLE="Credit Card Info">...</LEGEND>
 
Value
Any string of characters. The string must be inside a matching pair of (single or double) quotation marks.
 
Default None.
 
Object Model Reference
IE [window.]document.all.elementID.title
Hosted by uCoz