DEV Community

Cover image for HTML tags | fieldset
Carlos Espada
Carlos Espada

Posted on • Updated on


HTML tags | fieldset

It is used to group related elements within a form. It usually generates a border around it, modifiable with CSS.

Besides name, it has two main attributes:

  • disabled to disable all form elements contained within the <fieldset> and not receiving navigation events (click, focus)
  • form to, taking as value the id of a <form>, associate the <fieldset> to said form even if it is not contained within it. The latter is confusing and is not recommended, if you want to establish that link it is better to associate the form elements it contains one by one.

A title can be set for each <fieldset> using <legend> as the first child.

  • Type: block
  • Self-closing: No
  • Semantic value: No

Definition and example | Support

Top comments (0)

Timeless DEV post...

Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.

One does not simply learn git