---
id: "attr"
kind: "web-feature"
canonical: "https://timetostable.com/feature/attr"
baseline: "limited"
bcd_version: "8.1.11"
web_features_version: "3.48.0"
---

# attr() (`attr`)

The attr() CSS function, in the context of any property, returns the value of an attribute of an HTML element, with the option to return it as a specific type or unit. You can set a default value for missing or invalid attributes.

- **Group**: CSS
- **Baseline**: Limited Availability
- **Specification**: https://drafts.csswg.org/css-values-5/#attr-notation
- **Constituent BCD keys**: 16

## Browser Support Timeline

| Browser | Version | Release Date |
| --- | --- | --- |
| Chrome | 133 | 2025-02-04 |
| Chrome Android | 133 | 2025-02-04 |
| Edge | 133 | 2025-02-06 |
| Firefox | 155 | 2026-09-01 |
| Firefox for Android | 155 | 2026-09-01 |

