Q:

Can I use the pseudo element to insert html element?

I want to insert an html element after all my li s.
For example:
Html:
<ul>
 <li>some text</li>
 <li>some text</li>
 <li>some text</li>
</ul>

Css:
li:after{
  content:"<div class="someclass"></div>";
}

but it doesn't work

A:

Unfortunately, you can't do that with CSS. But it's possible in JavaScript, for instance with jQuery .append(); method.

// Add Baz to .myList
$( ".myList" ).append($("<li>Baz</li>"));
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<ul class="myList">
  <li>Foo</li>
  <li>Bar</li>
</ul>

