Show Output
<!DOCTYPE html> <html lang="en"> <head> <title>Grouping Form Controls in HTML</title> </head> <body> <form> <fieldset> <legend>Name</legend> <label>Firstname: <input type="text" name="firstname"></label> <label>Lastname: <input type="text" name="lastname"></label> </fieldset> <fieldset> <legend>Gender</legend> <label><input type="radio" name="gender" value="male"> Male</label> <label><input type="radio" name="gender" value="female"> Female</label> </fieldset> <fieldset> <legend>Hobbies</legend> <label><input type="checkbox" name="hobbies" value="soccer"> Soccer</label> <label><input type="checkbox" name="hobbies" value="cricket"> Cricket</label> <label><input type="checkbox" name="hobbies" value="baseball"> Baseball</label> </fieldset> <fieldset> <legend>Contact Details</legend> <label>Email Address: <input type="email" name="email"></label> <label>Phone Number: <input type="text" name="phone"></label> </fieldset> </form> </body> </html>