Skip to main content Link Search Menu Expand Document (external link)

Form labels

Use form labels for screen readers:

Don’t use simple text instead of label:

<div>
  <p>Enter your name</p>
  <input type="text" id="name" name="name" />
</div>

Do add label with for attribute:

<div>
  <label for="name">Enter your name</label>
  <input type="text" id="name" name="name" />
</div>