How to Define a Field Set in HTML

HTML (HyperText Markup Language) is the basic markup language which is used to create different types of web pages and help to display the information on the web browsers. If you want to create web pages with the help of HTML, you will have to put all the codes in the notepad and then save the file with the extension ‘.html’. When you will open the file, it will appear on the browser. You can define a field set in HTML in order to view your content on the web page in a particular manner. There are few things, mentioned in the given steps, which you have to keep in mind while using the codes in defining the field set.

Instructions

  • 1

    First of all, you must know what kind of field you are looking forward to create for your web page and where you want it to be displayed.

  • 2

    The tag which is used to open the field set is “
    ”. On the other hand, “
    ” is used to close the field set which you have created.

  • 3

    After opening the tag of field set i.e. “
    ”, you have to open a new tag which is known as legend i.e. “

    ” in which you will define the caption for all the elements of your field set. It is extremely important for you to use the legend tag because the caption enables the software programmer to assess the purpose of the field set. If you have not created a legend within the field set, a new developer will not be able to find it. Furthermore, you may also face issues in finding a particular field set if you have not created the legend tag.

  • 4

    Then, you have to define all your fields which you want to appear on the web page. For instance, you can create the fields like name, email and date of birth.

  • 5

    After defining all the fields, you have to close all the tags which you have opened in the start of the whole code.

  • 6

    Your final code will look like:




    Personalia:

    Name:

    Email:

    Date of birth:

Leave a Reply

Your email address will not be published. Required fields are marked *


1 × eight =