Uploaded November 2025 | Updated September 2026, 2 weeks ago
Following up from last week's video, I explore some advanced attribute selector techniques that let you target elements based on how their attributes start, end, or contain specific values. Near the end, I look at some use cases, like adding icons to external links and PDFs.
š Links
ā Bottom of this CodePen has the examples from this video: codepen.io/kevinpowell/pen/MQYGwY
ā Keep up to date with everything I'm up to kevinpowell.co/newsletter
š¬ Come hang out with other devs in my Discord Community discord.gg/nTYCvrK
ā Are you a beginner? HTML & CSS for absolute beginners is for you: learn.kevinpowell.co
š Start writing CSS with confidence with CSS Demystified: [https://cssdemystified.com](https://cssdemystified.com/)
š Already mastered CSS? Check out my advanced course, Beyond CSS: https://www.beyondcss.dev/
ā Timestamps
00:00 - Introduction
00:40 - Select exact matches
01:45 - Select any match
03:10 - Select prefixes
05:15 - Select based on any starting string of characters
06:35 - Select based on any ending string of characters
07:45 - A few practical use cases
09:25 - All occurances of a string
10:40 - Attribute selector performance
#css
---
Help support my channel
šØāš Get a course: kevinpowell.co/courses
š Buy a shirt: cottonbureau.com/people/kevin-powell
š Support me on Patreon: patreon.com/kevinpowell or through YT memberships: youtube.com/@KevinPowell/join
---
š§āš» My editor: VS Code - code.visualstudio.com
š My theme: One Dark Pro Var Night
š¤ My font: Cascadia Code
---
I'm on some other places on the internet too!
If you'd like a behind the scenes and previews of what's coming up on my YouTube channel:
Bluesky: https://bsky.app/profile/kevinpowell.co
Codepen: codepen.io/kevinpowell
Github: github.com/kevin-powell
---
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!
Following up from last week's video, I explore some advanced attribute selector techniques that let you target elements based on how their attributes start, end, or contain specific values. Near the end, I look at some use cases, like adding icons to external links and PDFs.
š Links
ā Bottom of this CodePen has the examples from this video: codepen.io/kevinpowell/pen/MQYGwY
ā Keep up to date with everything I'm up to kevinpowell.co/newsletter
š¬ Come hang out with other devs in my Discord Community discord.gg/nTYCvrK
ā Are you a beginner? HTML & CSS for absolute beginners is for you: learn.kevinpowell.co
š Start writing CSS with confidence with CSS Demystified: [https://cssdemystified.com](https://cssdemystified.com/)
š Already mastered CSS? Check out my advanced course, Beyond CSS: https://www.beyondcss.dev/
ā Timestamps
00:00 - Introduction
00:40 - Select exact matches
01:45 - Select any match
03:10 - Select prefixes
05:15 - Select based on any starting string of characters
06:35 - Select based on any ending string of characters
07:45 - A few practical use cases
09:25 - All occurances of a string
10:40 - Attribute selector performance
#css
---
Help support my channel
šØāš Get a course: kevinpowell.co/courses
š Buy a shirt: cottonbureau.com/people/kevin-powell
š Support me on Patreon: patreon.com/kevinpowell or through YT memberships: youtube.com/@KevinPowell/join
---
š§āš» My editor: VS Code - code.visualstudio.com
š My theme: One Dark Pro Var Night
š¤ My font: Cascadia Code
---
I'm on some other places on the internet too!
If you'd like a behind the scenes and previews of what's coming up on my YouTube channel:
Bluesky: https://bsky.app/profile/kevinpowell.co
Codepen: codepen.io/kevinpowell
Github: github.com/kevin-powell
---
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!



š Already mastered CSS? Check out my advanced course, Beyond CSS: https://www.beyondcss.dev/
Help support my channel
šØāš Get a course: https://www.kevinpowell.co/courses
š Buy a shirt: https://cottonbureau.com/people/kevin-powell
š Support me on Patreon: https://www.patreon.com/kevinpowell or through YT memberships: https://youtube.com/@KevinPowell/join
š§āš» My editor: VS Code - https://code.visualstudio.com/
š My theme: One Dark Pro Var Night
š¤ My font: Cascadia Code
Im on some other places on the internet too!
If youd like a behind the scenes and previews of whats coming up on my YouTube channel:
Bluesky: https://bsky.app/profile/kevinpowell.co
Codepen: https://codepen.io/kevinpowell/
Github: https://github.com/kevin-powell
And whatever you do, dont forget to keep on making your corner of the internet just a little bit more awesome! I challenged a CSS Wizard to a CSS Battle](https://i.ytimg.com/vi/TyCbg7YWaXo/mqdefault.jpg)





š Already mastered CSS? Check out my advanced course, Beyond CSS: https://www.beyondcss.dev/
ā Timestamps
00:00 - Introduction
01:45 - probably not worth refactoring
02:00 - Why we need to get used to the space-separated syntax
02:50 - Wider color gamuts with the new ones
03:50 - Relative colors use the space-separated syntax
#css
Help support my channel
šØāš Get a course: https://www.kevinpowell.co/courses
š Buy a shirt: https://cottonbureau.com/people/kevin-powell
š Support me on Patreon: https://www.patreon.com/kevinpowell or through YT memberships: https://youtube.com/@KevinPowell/join
š§āš» My editor: VS Code - https://code.visualstudio.com/
š My theme: One Dark Pro Var Night
š¤ My font: Cascadia Code
Im on some other places on the internet too!
If youd like a behind the scenes and previews of whats coming up on my YouTube channel:
Bluesky: https://bsky.app/profile/kevinpowell.co
Codepen: https://codepen.io/kevinpowell/
Github: https://github.com/kevin-powell
And whatever you do, dont forget to keep on making your corner of the internet just a little bit more awesome! Stop using the legacy color syntax](https://i.ytimg.com/vi/Uynb7Ci8JMg/mqdefault.jpg)


