Fieldset Tag in HTML 5

Posted By : Milind Ahuja | 31-Mar-2017

The fieldset is a HTML 5 tag which is very useful for organizing and grouping related items within a HTML form. It is supported by all the major browsers. With the help of fieldset tag and the legend tag, it is easier to make a understandable form for the users. 

This is the example of the fieldset tag:

    
FirstName:
LastName:

 


In the above image, there are two forms inside the fieldset tag. With the help of AngularJS, only one is editable at the time according to the radio button selection. In fieldset tag, we just need to add angular directive, ng-disabled with a required condition and all the input fields are disabled when the condition is true without using ng-disabled for each input field.

More on ng-disabled: https://docs.angularjs.org/api/ng/directive/ngDisabled

The advantages of using fieldset tag are that they allow you to mark up your data for example,  a form, in the most meaningful manner. Placing your inputs or fields in a fieldset tag is more illustative or expressive than in a div. 

 

THANKS

About Author

Author Image
Milind Ahuja

Milind is a bright Lead Frontend Developer and have knowledge of HTML, CSS, JavaScript, AngularJS, Angular 2+ Versions and photoshop. His hobbies are learning new computer techniques, fitness and interest in different languages.

Request for Proposal

Name is required

Comment is required

Sending message..