7. Forms
- 7.1. Use the
<label>
tag with thefor
andid
attributes to label form fields with a visible name - 7.2. Use the
title
attribute to label form fields that don’t have a visible label - 7.3. Use the
autocomplete
attribute to facilitate auto-fill - 7.4. Add help text directly to the
<label>
tags - 7.5. Add
required
oraria-required="true"
to mandatory fields - 7.6. Add error messages and correction suggestions directly into the
<label>
tag - 7.7. Group and label related fields with
<fieldset>
and<legend>