# 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.

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

Level: Apprentice · [More CSS terms at this level](https://www.ask-codey.com/glossary/subjects/css/apprentice)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/attribute-selector
