Change Style with JavaScript
Preview
Code
<p id="colorText">Click the button to change color.</p>
<button onclick="document.getElementById('colorText').style.color='red';">
Change Color
</button>
<p id="colorText">Click the button to change color.</p>
<button onclick="document.getElementById('colorText').style.color='red';">
Change Color
</button>