Forms are used to make a group for more understandable of all users and clients, as related data fields are easier to identify. It also makes it easier for users to concentrate on smaller and more clearly defined groups by understanding them one by one as an individual rather than try to grasp the entire form at once.
The grouping has to be created visually for users and in the code for easier data handling. By default, the <fieldset> and <legend> elements are used to group the related form data fields.
Example 1: The below example shows the usage of the default <fieldset> tag in HTML.
Alternative to the fieldset effect: The effect of the fieldset tag can be achieved using custom CSS, in case the user does not want to use the <fieldset> tag. It uses a clever use of border, margin, and various other CSS properties to achieve a similar effect.
Example 2: The below example demonstrates the alternative fieldset effect.
- What purpose does a <script> tag serve inside of a <noscript> tag?
- Difference between <article> tag and <section> tag
- Why <big> tag is not in HTML5 while <small> tag exists ?
- How to break line without using <br> tag in HTML / CSS ?
- How create table without using <table> tag ?
- How to Design Homepage like Facebook using HTML and CSS ?
- How to create an HTML button that acts like a link?
- How to Create Background Like TV Noise in a Canvas ?
- How to change a span to look like a pre with CSS?
- How to increment letters like numbers in PHP ?
- Google AMP amp-facebook-like
- Parallax scrolling effect using CSS.
- How to create Glowing Star effect using HTML and CSS?
- Double Layered Text Effect using CSS
- How to create slide left and right toggle effect using jQuery?
- How to create fade-in effect on page load using CSS ?
- How to Create Paradoxical Effect using CSS ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.