CSS में किसी विशिष्ट तत्व को उसके id एट्रिब्यूट के आधार पर चुनने के लिए #id सेलेक्टर का उपयोग किया जाता है। यह सेलेक्टर पेज पर केवल एक ही तत्व से मेल खाता है क्योंकि id अद्वितीय होना चाहिए।
उदाहरण
नीचे दिए गए उदाहरण में, हम id="tutorials" वाले तत्व को चुनकर उस पर लाल बॉर्डर लागू कर रहे हैं।
<!DOCTYPE html>
<html>
<head>
<style>
#tutorials {
border: 3px solid red;
}
</style>
</head>
<body>
<h1>Tutorialspoint</h1>
<h2>Learning</h2>
<p id="tutorials">Tutorials on web dev, programming, database, networking, etc.</p>
<p>Every tutorials has lessons with illustrations and figures.</p>
</body>
</html>
नोट: id सेलेक्टर सबसे अधिक विशिष्टता (specificity) वाला सेलेक्टर होता है, इसलिए यह अन्य स्टाइल्स को ओवरराइड कर सकता है।