FIELDSET (<fieldset>) Tag

by Jai 01-Jul-19

0 113


The <fieldset> tag define a set of form fields in an HTML document.
The <fieldset> tag can rarely used with the <legend> tag in html form documents. The <legend> tag work a caption for the <fieldset> tag. The <fieldset> tag comes in pairs as <fieldset></fieldset> (start and end tags).

Program:

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Example of HTML fieldset Tag</title>
</head>
<body>
  <h2>Example of fieldset Tag</h2>
   <form action="http://www.codingtag.com/" method="post">
     <fieldset>
       <legend>Gender</legend>
       <input type="radio" name="gender" value="male" id="male">
       <label for="male">Male</label>
       <input type="radio" name="gender" value="female" id="female">
       <label for="female">Female</label>
     </fieldset>
   </form>
</body>
</html>

Output:

FIELDSET (<fieldset>) Tag


Share:


Comments

    No Comments Yet.

Leave a Reply