<FIELDSET>tag creates a box around a group of widgets and <LEGEND>tag provides a label to the field set. Both tags require closing tags.
syntax <fieldset> control1 control2.........controln </fieldset> <legend> group label text</legend>
The following code shows the use of both of these tags:
<html> <head><title> text fields</title></head> <bodybgcolor="pink"> <p align="center"><b>admission form</b> <form> <fields> <legend><h2>detail</h2></legend> <p> <inputtype="text"name="name"value="enter your name:"size="25"maxlength="30"> name<br><br> <input type="password"name="passwd"size="25"maxlength="30"><br><br> <input type="text"name="address"size="25"maxlength="30"> address<br><br> <input type="radio"name="sex"value="male"checked>male<br> <input type="radio"name="sex"value="female">female<br> <select name="country"> <option value="india">india <optionvalue="america"> america <optionvalue="australia"> australia <optionvalue="new zealand"> new zealand <optionvalue="china"> china </select><b>country</b> <textarea name="comments"rows=2cols=20wrap="virtual:"> place your comments here: </textarea> <b> comments </b> <fieldset> <input type="file"name="attachements"size="30"accept="image/jpg"> <b> attachements</b> <palign=center> <input type="image"src="c:\windows\hlpglobe.gif"alt="submit"width=55height=40> <input type="reset"value="reset"> </form> </body> </html>
In the above window all the <INPUT> field types have been grouped and labeled as DETAILS
Disabled Attribute
This attribute disables a form element. The element contents are not only unalterable, but also unusable. It can be applied to any INPUT tag, as well as to the SELECT, OPTION, TEXTAREA tags. So to disable the File field. The code is written as below:
<html> <head><title> text fields</title></head> <bodybgcolor="pink"> <palign="center"><b>admission form</b> <form> <fields> <legend><h2>detail</h2></legend> <p> <inputtype="text"name="name"value="enter your name:"size="25"maxlength="30"> name<br><br> <inputtype="password"name="passwd"size="25"maxlength="30"><br><br> <inputtype="text"name="address"size="25"maxlength="30"> address<br><br> <inputtype="radio"name="sex"value="male"checked>male<br> <inputtype="radio"name="sex"value="female">female<br> <selectname="country"> <optionvalue="india">india <optionvalue="america"> america <optionvalue="australia"> australia <optionvalue="new zealand"> new zealand <optionvalue="china"> china </select><b>country</b> <textareaname="comments"rows=2cols=20wrap="virtual:"> place your comments here: </textarea> <b> comments </b> <fieldset> <inputtype="file"name="attachements"size="30"accept="image/jpg"disabled> <b> attachements</b> <palign=center> <inputtype="image"src="c:\windows\hlpglobe.gif"alt="submit"width=55height=40> <inputtype="reset"value="reset"> </form> </body> </html>
While submitting the form, the name/value pairs of disabled form elements are not included.