html fieldset tag

In the html <fieldset> tag is used to can group elements of inside form and if you use <fieldset> and the <legend> tag for form you can do to identify more forms for your user and also you disable all child element inside of <fieldset> tag.

The <legend> tag specify caption for fieldset element.All main browser is supported in <fieldset> tag .The standard attributes are class, dir, id, lang, style, title and xml:lang and event attributes are onclick, ondblclick, onmousedown, onmouseout, onmousemove, onmouseup, onkeydown, onkeypress and onkeyup.

Syntax:

<fieldset>
   <legend> ... </legend>
</fieldset>

Example Code

<fieldset>
      <legend> Registration Form </legend>
     User Name :  <input type="text" />
      Password :    <input type="password" />
      Address :      <textarea> </textarea>
      Phone No :    <input type="text" />
    <input type="submit" value="submit" />
</fieldset>

Out Put:



 Registration Form  User Name :  
Password :   
Address :      
Phone No :   
                    

In the above example has been added <fieldset> and <legend> tag for Register Form.




Content