HTML 5 <legend> Tag
Example
How to group related elements in a form:
<form>
<label for="male">Male</label>
<input type="radio" name="sex" id="male" />
<br />
<label for="female">Female</label>
<input type="radio" name="sex" id="female" />
</form> |
View it » |
Definition and Usage
The legend element defines a caption for the <fieldset>, <figure>, and the
<details> elements.
Differences Between HTML 4.01 and HTML 5
In HTML 4.01 the <legend> tag only applies to the <fieldset> element.
In HTML 5 the <legend> tag applies to the elements: <fieldset>, <figure>, and
<details>
The align attribute is not supported in HTML 5. Use CSS instead.
Standard Attributes
The <a> tag also supports the Standard Attributes in HTML 5.
Event Attributes
The <a> tag also supports the Event Attributes
in HTML 5.
|