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 - 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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
(Locked)
Form controls: :required and :optional; :enabled and :disabled5m 55s
-
(Locked)
Form controls: :read-only and :read-write5m 57s
-
(Locked)
Form control states: :indeterminate, :default, :checked6m 41s
-
(Locked)
Text fields: :autofill, :placeholder-shown7m 2s
-
(Locked)
Error checking: :valid, :invalid, :in-range, :out-of-range8m 15s
-
(Locked)
-
-
-