If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Welcome to making webpages interactive

JavaScript was originally developed for the browser to make websites interactive, but nowadays, it can be used for everything from powering servers, to drawing animations, to processing data. Websites start with simple HTML and CSS webpages, and then use JavaScript to allow users to interact with them!

Want to join the conversation?

Video transcript

In this course, you're going to learn how to make your webpages interactive. You'll start with simple HTML/CSS webpages, then add JavaScript to change them: like to make a word game, a slide show, an infinitely-loading gallery, or a drawing app. You can make pretty much anything you've seen on the web. We'll be using the language JavaScript to do all of that. And you might be confused if you've learned JavaScript already and used it in a different way. You see, JavaScript was originally designed to be shipped with browsers to make webpages interactive. But nowadays you can use JavaScript in so many different environments: you can use it to power the back end of servers that render webpages and store user data, or to write image manipulation scripts, or to process data in a spreadsheet, or even to control robots. If you learned JavaScript here on Khan Academy, then you learned it in the ProcessingJS environment to make drawings and animations. If you learned it somewhere else, like on Codecademy, then maybe you learned it with a simple command line environment. Each environment comes with its own set of functionality and global variables. For example, in ProcessingJS, there are many functions just for drawing an animation, like fill, ellipse, mouseClicked, and text. In a webpage environment, browsers provide a set of functions for making webpages interactive, like getElementById, setInterval, and AddEventListener. You'll learn all about those functions -- and more -- in this course, and be able to use them on your webpages to turn them into amazing interactive experiences.