Web features explorer

attr() (content only)

Widely available since 2018-01-29
Tags: css Groups: CSS

The attr() CSS function, in content property declarations, sets a ::before or ::after pseudo-element's content to the value of the specified HTML attribute.

Learning resources on MDN

Browser support