form tag
legend tag
label tag
input tag
TAG: fieldset
<fieldset> ... </fieldset>
Available in versions: 4.0
Browser compatibility: Explorer 4, 5 Netscape 6
The
<fieldset>
tag is used to group related
form
elements together with a caption and labels. The caption is created using the
legend
tag. One or more labels are created using the
label
tag. The browser is supposed to render the appearance of the caption and labels in a special manner.
The
fieldset
,
label
, and
legend
tags are poorly implemented by most browsers.
The closing tag is mandatory.
Core Attributes
class
dir
id
lang
onclick
ondblclick
onkeydown
onkeypress
onkeyup
onmousedown
onmousemove
onmouseout
onmouseover
onmouseup
style
title
Attributes
None.
Code:
<form>
<fieldset>
<legend>Please Enter Your Name</legend>
<label for="firstname">First Name</label><input type="text" id="firstname">
<br>
<label for="lastname">Last Name</label><input type="text" id="lastname">
</fieldset>
</form>
Output:
Please Enter Your Name
First Name
Last Name
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information