किसी एट्रिब्यूट वाले एलिमेंट्स चुनने के लिए [attribute] सिलेक्टर का उपयोग करें, उदाहरण के लिए alt एट्रिब्यूट या target एट्रिब्यूट आदि।
CSS [attribute] सिलेक्टर को लागू करने के लिए निम्न कोड चलाकर देखें:
उदाहरण
<!DOCTYPE html> <html> <head> <style> img[alt] { border: 3px solid orange; } </style> </head> <body> <img src = "https://www.tutorialspoint.com/videotutorials/images/tutor_connect_home.jpg" height="200" width="200"> <img src = "https://www.tutorialspoint.com/videotutorials/images/tutorial_library_home.jpg" height = "200" width="200" alt = "Tutorials Library"> </body> </html>