Program:
Output:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Fieldset Legend</title> </head> <body> <form> <fieldset> <legend> Form1 </legend> <label for="fname">First name:</label> <input type="text" id="fname" name="fname"><br><br> <label for="lname">Last name:</label> <input type="text" id="lname" name="lname"><br><br> <input type="submit"> </fieldset> </form> </body> </html>
Output: