คุณสามารถใช้ style กับ HTML elements ที่มีแอตทริบิวต์เฉพาะได้ กฎ style ด้านล่างจะ match ทุก input element ที่มี type attribute เท่ากับ text:input[type=text]{ color: #000000; }กฎสำหรับ attribute selector:p[lang] - เลือก p ทุกตัวที่มี lang attributep[lang=fr] - เลือก p ที่ lang attribute เท่ากับ fr