From the course: HTML Forms: Accessibility
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Autocomplete attribute
From the course: HTML Forms: Accessibility
Autocomplete attribute
- [Instructor] So autocomplete attribute is employed to guide browsers on suggesting autocomplete input values based on the user's previous interactions and data that has been entered into similar input fields. When you buy an ice cream from an ice cream vendor, you always have to state your preferred flavor to the vendor. However, each time you visit that vendor, you consistently choose just one flavor, your favorite, let's say caramel. Now, whenever that vendor sees you approaching their store without you stating your preference and without them asking, they begin to prepare your usual. This analogy illustrates how the autocomplete attributes functions in browsers when users input data into form fields. Now let us include the autocomplete attributes into the form. The autocomplete attributes offers two simple values, on or off. On direct the browser to suggest input values based on the user's past interactions, while off instructs the browser not to provide any input value…