Widely Available
CSS
id: attr-contents
attr() (content only)
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.
Baseline Status:
Achieved Widely Available on Jan 29, 2018 (Cross-browser Newly Available since Jul 29, 2015).
Desktop Browser Engine Support
Google Chrome
2
Supported
Mozilla Firefox
1
Supported
Apple Safari
3.1
Supported
Microsoft Edge
12
Supported
Mobile Browser Engine Support
Chrome Android
18
Firefox Android
4
Safari iOS
2
Specifications and References
MDN Browser Compat Data Keys: