You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Long forms? Use fieldset to group it into logical sets of input!
The <fieldset>HTML element is used to group several controls as well as labels (<label>) within a web form. MDN Docs
My favorite <fieldset> feature is that you may disable all inputs in a <fieldset> with the disabled attribute! You've probably been required to disable all fields in a form at some point and found that the <form> element alone does not allow this. And if not all, at least a subset, and having to add disabled to each input can get annoying: <fieldset> to the rescue.
Long forms? Use fieldset to group it into logical sets of input!
My favorite
<fieldset>
feature is that you may disable all inputs in a<fieldset>
with thedisabled
attribute! You've probably been required to disable all fields in a form at some point and found that the<form>
element alone does not allow this. And if not all, at least a subset, and having to adddisabled
to each input can get annoying:<fieldset>
to the rescue.In a longer form, it also makes sense to make use of the
<legend>
element to appropriately name the set of inputs you've enclosed in the<fieldset>
.Have you made use of
<fieldset>
before?And with that, Semantic Advent is on its way. Tell your friends!
The text was updated successfully, but these errors were encountered: