From the course: CSS: Selectors
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Form control states: :indeterminate, :default, :checked - CSS Tutorial
From the course: CSS: Selectors
Form control states: :indeterminate, :default, :checked
- [Instructor] Although they might not look like it, the form control states of indeterminate, checked, and default, go together. Let's look at how these select different elements on the page. First, let's start with checked because it's fairly straightforward. The checked pseudo-class indicates that something is checked as in the chosen radio button or the check box. Remember that here in our HTML, we have used the checked attribute to check our radio button and I've added an extra check box down here on the form. So we have one checkbox that is checked by default and a second check box that is not checked. So let us try that checked pseudo-class and see what happens. So if I say checked. And we'll style it up with an outline of two pixels, solid red, this is going to select our checked items that are here on the page. So that's going to select the checked radio button and the checked check box. And as you know, this is because we have this checked attribute set here. What happens if…
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)
-
-
-