fieldset

Form

<fieldset> ... </fieldset>

Attributes

attribute default description
id none specifies the unique ID
class none specifies the style sheet class
style none specifies the style sheet

Support

HTML 4.01 [STF], XHTML 1.0 [STF], XHTML 1.1
Microsoft (MSDN)
[IE4 or later][Firefox 1 or later][Safari 1 or later][Opera 6 or later][Netscape 6 or later]

Explanation

The fieldset tag groups the items of input form. The label name of the grouped items is specified by the <legend> tag.

Related Tags

form, legend

Sample Code [Output]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=shift_jis">
<title>Sample</title>
</head>
<body>
<h1>Sample</h1>
<form method="get" action="../bbs.cgi">
<fieldset>
<legend>Your OS</legend>
<input type="checkbox">UNIX
<input type="checkbox">MacOS
<input type="checkbox">Windows
</fieldset>
<fieldset>
<legend>Your Browser</legend>
<input type="checkbox">Firefox
<input type="checkbox">Safari
<input type="checkbox">Opera
<input type="checkbox">Internet Explorer
</fieldset>
</form>
</body>
</html>