<html>
<head>
</head>
<body>
<div class="my-count">
<div >1</div>
<div >2</div>
<div >3</div>
<div >4</div>
</div>
<script>
d=document.querySelector("div")
d.innerHTML=d.innerHTML.replace(/>([^<]+)<\s*\//g, "><span style='background: red'>$1</span></")
</script>
</body>
</html>