JSFiddle - React, Tailwind, and code Playground
by birdie2019
HTML
<h1 class="title">
Make me green
</h1>
<p class="para">
Make me red
</p>
<p class="para">
Me red too
</p>
<p class="para">
Also me
</p>
JavaScript
document.querySelector('.title').style.color = 'green';
for (var p of document.querySelectorAll('.para')) {
p.style.color = 'red';
}