Add HTML tag inside CSS content property

I am looking for a way to add an HTML tag for a CSS content property inside :after and :before .

In contrast to this question , which discusses only adding characters such as < . I am trying to add something like:

 .breadcrumbs li a:before { content: '<i class="icon"></i>'; } 

Is there any way to do this?

+7
css css3 css-content
source share
1 answer

It's impossible. You cannot create markup from CSS.

It should also be unnecessary - stick a background image / font icon / everything in the created pseudo-element that you already have.

+6
source share

All Articles