Happy Halloween

Chris Coyier //

HTML, CSS, and JavaScript got invited to a halloween party. They decided they would all dress up as each other!

HTML went as JavaScript:

<div id="pumpkin" onclick="alert('Boo!');"></div>

JavaScript went as CSS:

var jackolantern = document.getElementById('pumpkin');
jackolantern.style.color = "orange";
jackolantern.style.backgroundColor = "black";

CSS went as HTML:

#pumpkin:before {
   content: "Happy Halloween!";
}

Happy Halloween everyone!