JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html>

<html>

<head>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
</head>

<body>
    <p id="test">This is an example</p>
     <button type="button" id="myButton">Click</button>
    
    <script src="main.js"></script>
</body>

</html>

CSS

#test{
    display: block;
    color: blue;
}

JavaScript

document.getElementById("myButton").addEventListener("click", toggleMe);

function toggleMe(){
    alert(document.getElementById("test").style.display == "block");
    alert(document.getElementById("test").style.color == "blue");
}