Wondering about some real-world applications for attribute selectors? In this video, see some examples of how CSS attribute selectors will make your next project's maintenance easier.
- [Instructor] If you've been in web design … and development for any period of time, … you've wound up working in a system like WordPress, … Drupal, Squarespace, or something similar, … your client is responsible for putting in links to PDFs … or links that go off-site. … Maybe you have asked them to designate those links … that go to a PDF via an icon … or off-site via some type of text after the link. … Clients never remember to do this, … and it always gets out of date. … How cool would it be to set up some code … that does this automatically, … so your client will never have to worry about it again? … So let's go ahead and take a look at this example, … where I have two links here that are both going off-site, … and I'm going to show you two tricks … that you can use to designate that these links go off-site, … two different ways of programming this. … So one methodology that you could use would be this. … I am going to select all of my a tags … and those are going to have an href where somewhere …
- 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 Intermediate
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.