So far in this book we have covered how to define and structure the content of our webpages using HTML and then how to style that content using CSS. Now we turn our focus to how we define the webpage behaviour. This is where JavaScript comes into play.
JavaScript is the language that will add interactivity to your webpages. It is a programming language, the first we have seen in this book and it is also the only programming language that can run in your browser. This is what makes it the de facto standard for adding interactivity to your webpage, as there simply is no alternative. Learning JavaScript is a must for all serious web designers and developers.
So, what exactly can JavaScript do for your webpage? Well, JavaScript can do just about anything from creating alert prompts to appear on your webpage, to changing text dynamically at the click of a button, or even animating elements and a whole lot more.