content property before after

by greatCar

HTML

<!-- Learn about this code on MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/attr -->

<p data-foo="helloaaa">world</p>

CSS

[data-foo]::before {
  content: attr(data-foo) " bb";
}