# Labels & Fieldsets — HTML Fundamentals: Structure, Forms and Accessibility

Source: https://www.skillbyai.com/en/html/html-labels-fieldsets

> Make forms accessible with label for, fieldset and legend so every field is announced and clickable.

## label for + fieldset

`<label for>` matches an input's `id`; `<fieldset>` with `<legend>` groups related fields.

```html
<fieldset>
  <legend>Contact Info</legend>
  <label for="email">Email</label>
  <input id="email" type="email" name="email">
</fieldset>
```

## Why label matters

A proper `<label>` lets screen readers announce the field and lets users click the text to focus the input — not just cosmetic.
