JSFiddle - React, Tailwind, and code Playground

by AKTILOR

HTML

<p id="premier">texte important</p>
<p id="second">autre texte</p>

JavaScript

document.getElementById('second').onclick = function () {
	document.getElementById('second').style.backgroundColor = 'yellow';
}