The visual hint disappears during typing, and the input has no programmatic name.
<input
type="email"
placeholder="Email address">
Accessible HTML forms
A label tells people what to enter. It also gives assistive technology a reliable name for the control.
The principle
The design may hide a label visually. It must never remove the control’s accessible name.
Default pattern
A placeholder disappears as soon as someone types. A label stays available and, when associated with the input, can be clicked to move focus into the field.
The visual hint disappears during typing, and the input has no programmatic name.
<input
type="email"
placeholder="Email address">
The visible text and accessible name both remain “Email address.”
<label for="email">Email address</label>
<input id="email" name="email" type="email">
Compact design
Keep the native label and hide it visually. If that is not practical, aria-label can name the input directly. Placeholder text remains an optional hint—not the name.
Example shop
Try it
<label>.<label class="visually-hidden" for="search">
Search this site
</label>
<input id="search" type="search">
<input
type="search"
aria-label="Search this site">
Quick test