From the course: CSS: Selectors
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Exact and partial attribute value selectors - CSS Tutorial
From the course: CSS: Selectors
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. However, we could go on and say also title…
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.