Fine-tune your CSS attribute selections even further by selecting part of an attribute value. In this video, learn about beginning, ending, and arbitrary substring attribute value selectors, including their differences.
- [Instructor] Now that you know how to test … for a full value in an attribute selector … or individual words in that value, … how might you test for a few letters … as a value in an attribute selector? … So, fortunately, we do have beginning, ending, … and arbitrary substring attributes to help with that. … Let's go on ahead and put 'em all in action right here. … So, first of all, we have over here once again … the same sort of unordered list. … And what I'd like to do first is select … all of the title attributes that start … with the letters FI. … And so the way we're going to go about doing … that is, as always, square brackets … and then the title and then the upper caret, … the one above the number six, equals, and then FI. … So we'll go ahead and make that color: red. … So that's going to select both first and fifth, … because both of those have the letters FI … that start the value of that attribute selector. … So that's the beginning substring attribute value selector. … Next, let's go on ahead and look at the ending. …
- 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.