From the website:
The Skinny on CSS Attribute Selectors | CSS-Tricks
CSS has the ability to target HTML elements based on any one of their attributes. You probably already know about classes and IDs. This single element has three attributes: ID, class, and rel. To select the element in CSS, you could use and ID selector (#first-title) or a class selector (.magical). But did you know you can select it based on that rel attribute as well? That is what is known as an attribute selector:h2[rel=friend] {
/* woohoo! */
}There is a lot more to attribute selectors though, so let’s look closer at all the different options and try to cover some “real world” scenarios on when they might be useful.
Image may be NSFW.
Clik here to view.
Clik here to view.

Filed under: design, tips-n-tricks, web Tagged: attribute, css, howto, html, selector Image may be NSFW.
Clik here to view.

Clik here to view.
