I've been experimenting with some code and noticed that when I use the element ID, it works fine, but when I try to use the class name, it doesn't work...
<!DOCTYPE html>
<html>
<body>
<p id="p1" class="theClass">Hello World!</p>
<p id="p2">Hello World!</p>
<script>
document.getElementById("p2").style.color = "blue";
document.getElementsByClassName("theClass").style.color = "blue";
document.getElementById("p2").style.fontSize = "larger";
</script>
<p>The paragraph above was changed by a script.</p>
</body>
</html>
Check out the screenshot of the output: