HTML <legend> tag
Example
Group related elements in a form:
<form>
<fieldset>
<legend>Personalia:</legend>
Name: <input type="text" size="30" /><br />
Email: <input type="text" size="30" /><br />
Date of birth: <input type="text" size="10" />
</fieldset>
</form> |
Try it yourself!
|
Definition and Usage
The <legend> tag defines a caption for the fieldset element.
Browser Support
The <legend> tag is supported in all major browsers.
Differences Between HTML and XHTML
The align attribute was deprecated in HTML 4.01, and is not supported in XHTML 1.0 Strict DTD.
Optional Attributes
DTD indicates in which DTD the attribute is
allowed. S=Strict, T=Transitional, and F=Frameset.
Attribute |
Value |
Description |
DTD |
align |
top
bottom
left
right |
Deprecated. Use styles instead.
Specifies the alignment of the caption in a fieldset |
TF |
Standard Attributes
id, class, title, style, dir, lang, xml:lang, accesskey |
For a full description, go to Standard
Attributes.
Event Attributes
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup |
For a full description, go to Event
Attributes.
Whether you're new to XML or already an advanced user, the user-friendly views
and powerful entry helpers, wizards, and debuggers in XMLSpy are designed to
meet your XML and Web services development needs from start to finish.
- XML editor
- Graphical XML Schema / DTD editors
- XSLT 1.0/2.0 editor, debugger, profiler
- XQuery editor, debugger, profiler
- Support for Office Open XML (OOXML)
- Graphical WSDL editor & SOAP debugger
- Java, C#, C++ code generation
- And much more!
Download a fully functional free 30-day trial today!
|