Adscend

Click Here



Click Here



Click Here

Sunday 8 September 2013

Form Fieldset

HTML Form Fieldset

1.The HTML fieldset tag is used for grouping related form elements.

2.The fieldset tag draws a box around the related elements.

3.The <legend> tag defines a caption for the <fieldset> element.

4.By using the fieldset tag and the legend tag, it is very easy to understand for your users.

Example: 1
<form >
      <fieldset>
         <legend>First and Last Name</legend>
         <p>First Name: <input type="text" name="fname"></p>
         <p>Last Name: <input type="text" name="lname"></p>
         <p><input type="submit" name="submit" value="Save Data"></p>
      </fieldset>
 </form>
Output
First and Last Name

First Name:

Last Name:



Example: 2
<form>
  <fieldset>
  <legend>Subscription info</legend>
    <label for="name"> First Name:</label>
    <input type="text" name="name" id="name" />
    <br />
    <label for="mail"> Last Name:</label>
    <input type="text" name="mail" id="mail" />
    <br />
    <label for=" submit"> Save Data</label>
    <input type="submit" name="submit" id="submit" />
  </fieldset>
</form>
Output
Subscription info





No comments:

Post a Comment