Add HTML tag inside CSS Content property


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

Unlike this question which only discusses adding symbols like <. What I'm trying to add is something like:

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

Is there any possible way to do that?

Problem courtesy of: Muhammad Reda


This is impossible. You cannot generate markup from CSS.

It should also be unnecessary - stick your background image / icon font / whatever in the generated pseudo-element you have already.

Solution courtesy of: Quentin


There is currently no discussion for this recipe.

This recipe can be found in it's original form on Stack Over Flow.