Use autocomplete attribute on html inputs to improve form UX
8/21/2025
#html#frontend#ux
The autocomplete attribute helps browsers prefill form fields with stored data.
This makes forms faster to complete and reduces user frustration.
<form>
<input type="email" name="email" autocomplete="email" placeholder="Email" />
<input type="password" name="password" autocomplete="current-password" placeholder="Password" />
<input type="text" name="name" autocomplete="name" placeholder="Full name" />
<input type="tel" name="phone" autocomplete="tel" placeholder="Phone number" />
<button type="submit">Sign in</button>
</form>
Some useful values:
email→ suggests stored emailscurrent-password/new-password→ helps with password managersname,tel,address-line1,postal-code→ autofill personal details
By using autocomplete properly, you reduce typing effort and give users a smoother experience.
Visit the MDN docs for more information and a list of all possible values.
More Dev Tips
Discover more tips and tricks to level up your development skills
Stay up to date
Sign up for our newsletter and we will keep you updated on everything going on with supastarter.