From the course: CSS: Selectors

Unlock the full course today

Join today to access over 24,600 courses taught by industry experts.

Text fields: :autofill, :placeholder-shown

Text fields: :autofill, :placeholder-shown - CSS Tutorial

From the course: CSS: Selectors

Text fields: :autofill, :placeholder-shown

- [Instructor] Next up, let's explore autofill and placeholder shown. First, we need to get some of this information in our HTML, so let's start there. I made a few modifications to the HTML in this form already, first here, on line number 10, you'll notice that I have added auto complete equals name. This attribute indicates what kind of information we want in this field. The browser often makes a guess at the data, but we can more finely tune it. For now, I've asked for name, which is going to gimme the first and last names in this field. Be sure to check the docs for all of the auto complete possible values as there are several dozen, and just to demonstrate this for you, when I click inside of the name field, you'll see that I get the auto complete option here, for this field. It's asking for my name and it will show my first and last name here in the name field, and it also happens to be that it's filling in my email address and my phone number, probably because some form…

Contents