Please enable JavaScript to use CodeHS

How to use the CodeHS JS Library on your Website

This tutorial shows you how you can use the CodeHS Graphics JavaScript library outside of CodeHS on any website.

By Zach Galant

Co-Founder of CodeHS

We're going to take this Balloons program and embed it inside a webpage with a title that says "Balloons" above it.


First, this is showing the Balloons program in a JavaScript Graphics IDE so you can see what it looks like.

Step 3: Copy your JavaScript Program into your HTML File

Now, you just need to copy the code for your JavaScript program into index.html where it says // Your code goes here


Here's a sample full HTML program with the Balloons JavaScript program inside of it.