HTML <fieldset> tag
The <fieldset> tag is used to group together a set of elements that you choose by drawing a box around them. This will present those elements in a more easily readable way by adding emphasis.
Standard attributes
class, dir, id, lang, style, title, xml:lang
For more information on standard attributes, check out our HTML standard attributes reference page.
Event attributes
onclick, ondblclick, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onkeydown, onkeypress, onkeyup
For more information on event attributes, check out our HTML event attributes reference page.
Example
Tips & notes
When using the <fieldset> tag with a form it should always come right after the <form> tag like in the above example.
Use the <legend> tag to set a title for the fieldset.
While the <fieldset> tag is usually used with forms, you don't necessarily have to use it with a form. A good example of using the <fieldset> with something else besides a form can be found on our Web development jobs tutorial. Scroll down a little on this page until you see the green box. This is the <fieldset> tag at work without a form.