Name

Einfacher Attribut-Selektor

Muster:

element1[attr]

Beschreibung:

Dieser Selektor ermöglicht es Autoren, ein Element nach dem Vorhandensein eines Attributs auszuwählen, ungeachtet des Attributwerts.

Beispiele:

a[rel] {border-bottom: 3px double gray;}
p[class] {border: 1px dotted silver;}

Get CSS kurz & gut, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.