Attribute selector

Selects elements by an attribute, written in [brackets].

What is an attribute selector?

An attribute selector picks elements by an attribute or its value, written in square brackets.

input[type="email"] { border-color: steelblue; }
a[target="_blank"] { padding-right: 16px; }

Level: Apprentice · More CSS terms at this level

Updated