Antes del contenido del atributo
/* html */
<p data-foo="Lorem Ipsum"></p>
/* css */
[data-foo]::before {
content: attr(data-foo);
}
Rudolph Steyn
/* html */
<p data-foo="Lorem Ipsum"></p>
/* css */
[data-foo]::before {
content: attr(data-foo);
}