From the course: CSS: Selectors

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Cool attribute selector tricks

Cool attribute selector tricks - CSS Tutorial

From the course: CSS: Selectors

Start my 1-month free trial

Cool attribute selector tricks

- [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 in that string, will be…

Contents