Join James Williamson for an in-depth discussion in this video Descendent selectors, part of CSS: Selectors.
- Descendent selectors give us the ability…to combine selectors together…in a way that takes advantage of the…nested structure of HTML documents.…They allow us to be much more precise…in targeting elements as…we can target them based on where they're found…within the page.…Now I have a few examples here that can help…me show you what I'm talking about.…So this is the descendent.htm from…the 01_05 folder…and I've opened it up within a browser.…Now in the first paragraph here,…you're gonna see a bolded selector right here.…So this is essentially the syntax of descendent selectors.…
You chain selectors together separated by white spaces.…And that essentially talks about the structure…of where to find it.…In this case, that would be find every paragraph…nested inside of a div.…Now the biggest barrier to understanding…descendent selectors is in thinking that…how deep they are matters.…For example, a lot of people think that…that means that only when ps are found…immediately inside of the div…would this be targeted, but that's not true.…
- Targeting classes and IDs
- Working with group selectors
- Targeting element attributes
- String matching
- Targeting links with pseudo-class selectors
- Targeting child elements and empty elements
- Targeting parent, child, and sibling elements
- Matching patterns
- Writing efficient selectors
Skill Level Intermediate
1. Basic Selectors
2. Attribute Selectors
3. User Action Pseudo-Class Selectors
4. Structural Selectors
6. Matching Patterns
7. Writing Efficient 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.