Join James Williamson for an in-depth discussion in this video Element selectors, part of CSS: Selectors.
- We'll start exploring the basic CSS selectors…by examining perhaps the most basic selector of them all,…and that would be the element selector.…Element selectors allow you to target…any matching HTML element types.…So this makes them a very general, very broad selector…that can control a large amount of styling site-wide…with just a single selector.…As you can see from the chart here,…they are very well-supported in all major browsers,…they go all the way back to the very beginnings of CSS,…and they really form the core and the foundation…of a lot of the styles in your site.…
I'm going to scroll down a little bit here…in the example file, more on this file in a moment,…just so you can sort of see the syntax.…So, any time we want to write an element selector,…all we have to do is take the corresponding…HTML element and just remove…the less than/greater than brackets around it.…For example, if we're going to target every Heading 1…in our document, you can see the example we have here,…you just type in h1 and remove the brackets around it.…
- 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
CSS: Advanced Typographic Techniqueswith James Williamson3h 14m Intermediate
HTML5: Graphics and Animation with Canvaswith Joe Marini3h 7m 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.