Yo my coding ninja fledglings, in this HTML lesson for beginners we’ll dive into adding some JavaScript into our HTML web page. JavaScript controls the interactivity of our web pages and can be added in a variety of ways to HTML.

We add JavaScript to HTML by using the script tag in the head of body, by referencing an external script file, or by adding some in-line scripting onto tags themselves.

For more front-end development courses & to black-belt your coding skills, head over to or

Comment with any questions and don’t forget to subscribe!


  1. Make sure when you type the code, type "onclick" not "oneclick" like i did, took me forever to figure out that was the problem lol

  2. Hi Ninja! Placing the script tag either in the head tag or body tag works the same way for me. The page is rendered by the time the alert pops up in both cases. Can you please explain why?

  3. Hi there, may i know why i cant add another link like u does in 7:36 ? It says that my file is not found. Im using notepad to creates html and im still new to this :).


Please enter your comment!
Please enter your name here