Form

Name input

Published on

Description Link to section description

The name input captures a person's name. Use autocomplete values like given-name, family-name, or name to enable browser autofill.

Example Link to section example

Open in new tab(opens in new tab)
View HTML markup
<form method="POST" novalidate="">
  <div><label for="name"> Name</label> <span id="name-hint">How we should refer to you</span> <input value="" id="name" name="name" dir="auto" autocapitalize="off" autocomplete="name" autocorrect="off" spellcheck="false" type="text" aria-describedby="name-hint" /> </div> <button type="button">Submit</button>
  <p>Need help? <a href="/form/input-name" target="_top">View our guidance</a></p>
</form>

Accessibility Link to section accessibility

  • Use explicit <label for="id"> association with clear label text.
  • Use appropriate autocomplete values (name, given-name, family-name, additional-name, honorific-prefix, honorific-suffix).
  • Do not split name fields unnecessarily — a single "Full name" field is often more inclusive.

References Link to section references

Variables Link to section variables

None for input