CSS attribute selectors do more than test the presence or absence of an attribute. In this video, learn how to find an exact or partial match using exact and partial attribute value selectors.
- [Instructor] We've determined that we can test … for the presence or absence of an attribute. … But what if we want to select all or part … of an attribute's value? … Fortunately, we have two selectors designed to do that, … the exact and the partial attribute selectors … which I'll go through here. … So here we have an unordered list … where you're working with the title attribute, … and we have a whole bunch of random words … in the title attribute, … and we would like to make some selections from that. … So let's just start by trying to select the items … that contain the word first. … So the first kind of attribute selector I'd like … to talk about is the exact attribute selector. … So here we'll simply say title equals first. … So this is going to test for an exact match … that the title attribute has a value of first … and nothing else. … If we go ahead and say color red … that will select only the first bullet item … on that list and no other because that is the exact match. …
- Targeting classes and IDs
- Working with group selectors
- Targeting element attributes
- Targeting links with pseudo-class selectors
- Targeting child elements and empty elements
- Targeting parent, child, and sibling elements
- Best practices for CSS
- The impact of CSS selectors on performance
Skill Level Beginner
The power of selectors1m 8s
1. Review of Basic CSS
2. Combinator Selectors
3. Attribute Selectors
Simple attribute selectors2m 47s
4. Pseudo-Classes, Pseudo-Elements, and the Universal Selector
5. Choosing Selectors
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.