O'Reilly logo

Dynamic HTML: The Definitive Reference by Danny Goodman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

<LEGEND> — NN n/a IE 4 HTML 4

Synopsis

<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

Attributes

ACCESSKEY

CLASS

ID

LANGUAGE

TITLE

ALIGN

DIR

LANG

STYLE

 

Event Handler Attributes

Handler

NN

IE

HTML

onClick

n/a

4

4

onDblClick

n/a

4

4

onDragStart

n/a

4

n/a

onHelp

n/a

4

n/a

onKeyDown

n/a

4

4

onKeyPress

n/a

4

4

onKeyUp

n/a

4

4

onMouseDown

n/a

4

4

onMouseMove

n/a

4

4

onMouseOut

n/a

4

4

onMouseOver

n/a

4

4

onMouseUp

n/a

4

4

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required