The cover of The Complete Idiot's Guide to Create a Web Page The Complete Idiot's HTML Tag Reference

| Index | Previous Tag: <LAYER> | Next Tag: <LI> |


<LEGEND>

Adds a label to the box produced by a <FIELDSET> tag

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later Not supported
Notes:
  • This tag requires the </LEGEND> end tag.
Attributes:
ACCESSKEY = "Text (single character)"
A character to use as a keyboard shortcut for selecting the first control within the fieldset.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later Not supported

Notes:

  • The access key is invoked by using it as a key combination. For example, if you specify ACCESSKEY="P", then the user invokes the key by pressing Alt+P (Windows) or Cmd+P (Mac).

ALIGN = "Text"
The placement of the legend text relative to the fieldset box.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later Not supported

Notes:

  • Possible values: LEFT (the default), CENTER, RIGHT.

CLASS = "Text"
The style sheet class used by the tag.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later Not supported

Notes:

  • You can specify two or more classes; be sure to separate each class name with a space.

ID = "Text"
An alphanumeric string that uniquely identifies the tag.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later Not supported

Notes:

  • Although you can use letters and numbers for the ID, the first character must be a letter.

LANG = "Text"
The language used by the tag's attribute values and text content.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later Not supported

STYLE = "Text"
The style or styles to use with the tag.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later Not supported

Notes:

  • If you enter multiple style properties, separate each one with a semi-colon (;).

Example:
<FIELDSET>
<LEGEND>Salary Level</LEGEND>
<P>
Which of the following best describes your current salary level:
<UL>
<INPUT TYPE=RADIO NAME="Salary" VALUE="Salary1" CHECKED>Below the poverty line<BR>
<INPUT TYPE=RADIO NAME="Salary" VALUE="Salary2">Living wage<BR>
<INPUT TYPE=RADIO NAME="Salary" VALUE="Salary3">Comfy<BR>
<INPUT TYPE=RADIO NAME="Salary" VALUE="Salary4">DINK (Double Income, No Kids)<BR>
<INPUT TYPE=RADIO NAME="Salary" VALUE="Salary5">Rockefellerish<BR>
</UL>
</FIELDSET>
How It Looks:
Salary Level

Which of the following best describes your current salary level:

    Below the poverty line
    Living wage
    Comfy
    DINK (Double Income, No Kids)
    Rockefellerish

| Index | Previous Tag: <LAYER> | Next Tag: <LI> |