I have a little problem with my css when I’m using the data-icon attribute.
I used the :before property to do that and my icon is displayed on top of it and not on the left like I wanted.

CSS :
[data-icon]:before {
font-family: 'icons';
content: attr(data-icon);
speak: none;
font-weight: normal;
-webkit-font-smoothing: antialiased;
}
HTML:
<ul class="tags" data-icon="T">
<li>Petrole</li>
<li>Gazoil</li>
<li>BP</li>
<li>Car</li>
</ul>
Hope you can figured it out.
You can position icon absolutely relative to its element:
Another possible way is to use
display: inlineordisplay: inline-blockfor items and generated pseudoelement icon: