Group related elements in a form:
The <legend> tag defines a caption for the <fieldset> element.
Element | |||||
---|---|---|---|---|---|
<legend> | Yes | Yes | Yes | Yes | Yes |
The "align" attribute is not supported in HTML5.
Attribute | Value | Description |
---|---|---|
align | top bottom left right |
Not supported in HTML5. Specifies the alignment of the caption |
The <legend> tag also supports the Global Attributes in HTML.
The <legend> tag also supports the Event Attributes in HTML.
HTML DOM reference: Legend Object
Most browsers will display the <legend> element with the following default values: