<style> .red { color: red; } </style> <p class="hello">Lorem ipsum dolor sit amet, consectetur</p> <p class="hello">Sapiente in delectus dolorem reiciendis ditii</p> <p class="hello">Quis dolore autem voluptatibus repellat</p> <script> var allP = document.querySelectorAll('p.hello'), len = allP.length, i = 0, timer = setInterval(function () { if (len--) { allP[i++].className += ' red'; } else { clearInterval(timer); } }, 2000); </script>