HTML Syntax
<legend align = bottom | center | left | right | top class = classname id = value style = css_style_rules title = text >
The LEGEND element allows authors to assign a caption to a FIELDSET. The legend improves accessibility when the FIELDSET is rendered non-visually.
This element must be the first element in FIELDSET.
NOTE: Both start and end tags are required.
The <legend> element has no attribute of its own, but supports global attributes common to all HTML elements.
<legend>
This sample demonstrates the use of LEGEND along with the FIELDSET and LABEL elements to develop an accessible form. The FIELDSET defines the container for the form.
<form> <fieldset> <legend>Accessibility Form</legend> <table cellpadding=5> <tbody> <tr> <th>Label</th> <th>Control Range</th></tr> <tr> <td><label for=ofirstname tabindex=-1> <u>F</u>irst Name</label></td> <td><input accessKey=f id=ofirstname name=firstname tabindex=1></td></tr> <tr> <td><label for=olastname tabindex=-1> <u>L</u>ast Name</label></td> <td><input accessKey=l id=olastname name=lastname tabindex=2></td></tr> <tr> <td><label for=oselect1 tabindex=-1> Favorite <u>P</u>astime</label></td> <td><select accessKey=p id=oselect1 name=select1 tabindex=3> <option selected>Web <option>Movies <option>Concerts <option>Pubs <option>Books</option> </select></td></tr> </tbody></table> </fieldset> </form>
Show me
FIELDSET
Check out related books at Amazon
© 2025 Reynald Nuñez and asp.net.ph. All rights reserved. If you have any question, comment or suggestion about this site, please send us a note