Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
- :first-child and :last-child 4:15
- :first-child and :last-child Challenge 2 objectives
- :only-child and :empty 4:58
- Substring Matching Attribute Selectors - "Begins With" and "Ends With" 8:19
- Substring Matching Attribute Selectors - "Contains" 6:44
- Substring Matching Attribute Selectors Challenge 3 objectives
- Element States Pseudo-Classes 6:20
- Structural and Element States Pseudo-Classes Review 5 questions

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Like user-action pseudo-classes, CSS has UI element states pseudo-classes that let us target elements based on user interaction states.
Related Videos
Quick Reference
Using :disabled and :checked
To target a disabled input
element, we can write:
input:disabled {
background-color: grey;
}
To target a radio button or checkbox when checked, we can write:
:checked {
border-color: red;
}
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
karan Badhwar
Web Development Techdegree Graduate 18,135 Points1 Answer
-
saber
13,276 Points1 Answer
-
Sam Weeks
Front End Web Development Techdegree Student 16,699 Points2 Answers
-
Rouillie Wilkerson
10,419 Points2 Answers
-
G H Mahimaanvita
16,234 Points1 Answer
-
Shloime Kahan
4,943 Points1 Answer
-
Madeline Yao
Full Stack JavaScript Techdegree Student 9,611 Points1 Answer
-
Saqib Ishfaq
13,912 Pointswhy is it that we have to specify more, after having specified the type attribute already
Posted by Saqib IshfaqSaqib Ishfaq
13,912 Points2 Answers
-
Sean Flanagan
33,236 Points3 Answers
-
Alex Tabacchi
2,342 PointsAfter the adjacent sibling combinator, why did the teacher add the sibling 'label'?
Posted by Alex TabacchiAlex Tabacchi
2,342 Points1 Answer
-
Sherrie Gossett
14,924 Points1 Answer
-
Kailash Seshadri
3,087 Points1 Answer
-
Augusto J. Ferriols IV
5,228 Points2 Answers
-
Emmanuel Rojas
6,994 Points1 Answer
-
Shazad Kazi
10,758 Points3 Answers
-
Aaron Coursolle
18,014 Points1 Answer
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up