Welcome to making webpages interactive
About this video
This course teaches you to make HTML/CSS webpages interactive with JavaScript, such as word games, slide shows and drawing apps. JavaScript runs in many environments (browsers, servers, scripts, robots), and each environment provides its own functions: ProcessingJS has drawing functions like ellipse, while browsers provide functions like getElementById and setInterval.
You'll be able to
- name several environments where JavaScript can run.
- explain that each environment gives JavaScript its own set of functions.
- tell which functions belong to ProcessingJS and which belong to the browser.
Key words
- environment
- The place JavaScript runs, which comes with its own functions and global variables.
- ProcessingJS
- The environment used on Khan Academy for drawing and animation.
- interactive
- Responding to what the user does, like clicking or typing.
- getElementById
- A browser function used when making webpages interactive.
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.
Video © Khan Academy, used under CC BY-NC-SA. Watch on Khan Academy. Puzzicle is not affiliated with Khan Academy.