After discovering a code snippet that can change font family based on ID, I am interested in implementing it on my website but with a twist - using classes instead of IDs.
<!DOCTYPE html>
<html>
<body>
<div class="myP">This is a paragraph.</div>
<script>
document.getElementsByClassName("myP").style.fontFamily = "Impact,Charcoal,sans-serif";
</script>
</body>
</html>