model object to help all of your CSS wants.
<html> <physique> <p id="p1">Howdy World!</p> <script> doc.getElementById("p1").model.coloration = "crimson"; </script> <p>The paragraph above was modified by a script.</p> </physique> </html>
// Get a reference to the component var myElement = doc.querySelector("#p1"); // Now you'll be able to replace the CSS attributes myElement.model.coloration = "crimson"; myElement.model.backgroundColor = "yellow";
Notice that the place CSS properties would use
dashes to separate phrases, like
background-color would turn into