NOTICE: This website is no longer updated or supported - as such many of the techniques used to build it may seem antiquated in the modern day. It is preserved for historical reasons only.

HTML XHTML The Complete Reference
home » reference » appendix a » html element reference

<fieldset> (Form Field Set)


This element allows form designers to group thematically related controls together.

Standard Syntax


<fieldset
class="class name(s)"
dir="ltr | rtl"
id="unique alphanumeric identifier"
lang="language code"
style="style information"
title="advisory text"
</fieldset>

Attributes Defined by Internet Explorer


accesskey="key" (5.5)
align="center | left | right" (4)
contenteditable="false | true | inherit" (5.5)
datafld="name of column supplying bound data" (4)
disabled="false | true" (5.5)
hidefocus="true | false" (5.5)
language="javascript | jscript | vbs | vbscript" (4)
tabindex="number" (5.5)
unselectable="on | off" (5.5)

Standard Events


onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

Events Defined by Internet Explorer


onactivate, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate, onbeforeeditfocus, onbeforepaste, onblur, oncontextmenu, oncontrolselect, oncopy, oncut, ondeactivate, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onfocus, onfocusin, onfocusout, onhelp, onlosecapture, onmouseenter, onmouseleave, onmousewheel, onmove, onmoveend, onmovestart, onpaste, onpropertychange, onreadystatechange, onresizeend, onresizestart, onselectstart, ontimeerror

Element Specific Attributes


align
Internet Explorer defines the align attribute, which sets how the element and its contents are positioned in a table or the window.

datafld
This attribute specifies the column name from the data source object that supplies the bound data. This attribute is specific to Microsoft's data binding.

Example


<fieldset>
   <legend>
Customer Identification</legend>
 <br>
   <label>
Customer Name:
<input type="text" id="CustName" size="25">
</fieldset>

Compatibility


HTML 4, 4.01, XHTML 1.0, 1.1
Internet Explorer 4, 5, 5.5, 6
Opera 4-7
Netscape 6, 7

Notes


Grouping controls makes it easier for users to understand the purposes of the controls while simultaneously facilitating tabbing navigation for visual user agents and speech navigation for speech-oriented user agents. The proper use of this element makes documents more accessible to people with disabilities.

The caption for a <fieldset> tag can be defined by the legend element.

The typical visual rendering of a fieldset is a boxed grouping of form fields with a label defined by the legend element.

(X)HTML Elements
CSS Properties
Previous: embed Next: font
< Home | About | Chapters | Examples | Errata | Reference | Site Map >