HTML Attributes

HTML <input> autocomplete Attribute

The autocomplete attribute controls whether the browser may automatically fill in an input's value.


The <input> autocomplete Attribute

The autocomplete attribute tells the browser whether, and how, it should help fill in a form field using previously stored values. On <input>, <textarea> and <select>, it accepts on, off, or specific tokens that describe the expected data so the browser can autofill accurately.

Syntax

ℹ️

Syntax: <input autocomplete="token">. The value is on, off, or a standard token such as email, name, tel or street-address.

Help the browser autofill contact details
<input type="text" name="fullname" autocomplete="name">
<input type="email" name="email" autocomplete="email">
<input type="password" name="new-pass" autocomplete="new-password">
ValueDescription
onAllow the browser to autofill this field (default behaviour)
offDisable autofill, e.g. for sensitive or one-off fields
nameFull name
emailEmail address
telTelephone number
new-passwordA new password, hinting password managers to suggest one
💡

Use meaningful tokens rather than off wherever possible. Correct tokens improve accessibility and speed up form completion for users on mobile devices.

Ready to use your HTML skills?

Find web development internships and fresher jobs across India.

Browse Web Dev Internships