The fieldset element is used to group a set of related form controls. The fieldset element displays a thin boarder around it in most web browsers. A legend element in each fieldset is required to provide a title for the set of fields.
Listed below are the most common attributes you can use for the fieldset element:
- class - provides the class or classes of the field set. This attributes is used to identify the name of the style class or classes to be used for rendering.
- id - provides a unique name for the field set.
- lang - provides the language in which the enclosed content is coded.
- style - provides a cascading style sheet (CSS) properties to the field set.
- title - provides a text title for the field set. Most web browser displays the value of the title as a "tooltip".
Here's an example on how to use the fieldset element:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<mate name="keywords" content="blog, web development" />
<title>the FIELDSET element</title>
</head>
<body>
<h1>
the FIELDSET element
</h1>
<form action="register.hp" method="post" id="frmNew" name="frmNew">
<fieldset>
<legend>Login</legend>
<p>
<label for="txtUserName">User Name</label>
<input type="text" name="txtUserName" id="txtUserName" value="" />
</p>
<p>
<label for="txtPassword">Password</label>
<input type="password" name="txtPassword" id="txtPassword" value="" />
</p>
</fieldset>
<br />
<input type="submit" name="btnSubmit" id="btnSubmit" value="Submit" />
</form>
</body>
</html>
1 comments:
I am extremely impressed along with your writing abilities, Thanks for this great share.
Post a Comment