Home  >  Article  >  Web Front-end  >  How to display a fieldset in HTML?

How to display a fieldset in HTML?

WBOY
WBOYforward
2023-09-04 11:53:031226browse

How to display a fieldset in HTML?

HTML

Tags are used to group related form elements and display sets of fields. By using fieldset tags and legend tags, you can make your forms easier for users to understand.

Example

You can try running the following code to display the fieldset in HTML -

<!DOCTYPE html>
<html>
   <head>
      <title>HTML fieldset Tag</title>
   </head>
   <body>
      <form>
         <fieldset>
            <legend>Details</legend>
            Student ID: <input type = "number"><br />
            Subjects:<input type = "text"><br />
         </fieldset>
      </form>
   </body>
</html>

The above is the detailed content of How to display a fieldset in HTML?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete