Skip to main content
CSS-Tricks
Since 2007
  • Articles
  • Guides
  • Almanac
  • Links
  • Picks
  • Newsletter
  • Search

Articles Tagged
CSS

127 Articles
{
,

}
Direct link to the article The Skinny on CSS Attribute Selectors
CSS

The Skinny on CSS Attribute Selectors

CSS has the ability to target HTML elements based on any one of their attributes. You probably already know about classes and IDs. Check out this bit of HTML:

<h2 id="title" class="magic" rel="friend"David Walsh</h2

This single element has three …

Chris Coyier on Feb 13, 2010
  • Newer
  • 1
  • ...
  • 13
  • 14
  • 15

CSS-Tricks is powered by DigitalOcean.

Get Curated Front-End Roundups Right in Your Inbox

Coming back really, really soon! See past issues →

DigitalOcean
  • About DO
  • Cloudways
  • Legal stuff
  • Get free credit!
CSS-Tricks
  • Contact
  • Write for CSS-Tricks!
Social
  • RSS Feeds
  • CodePen
  • Mastodon
  • Bluesky
Back to Top