These instructions show you how to add a javascript file to your website, by using some example countdown timer code.
You can use this javascript example in your website, but these instructions do not show you how to write your own javascript program.
This example code sets a countdown timer using Javascript, and runs it using HTML in our index.html file.
Switch the the 'countdown.js' file and look at line 4 - this is where you set the date to count down to!
It is currently set to "Jun 26, 2021 16:00:00" - try changing it to, for example, your birthday.
Now switch tabs back to index.html. Lines 14 & 15 run the Javascript file.
<h1 id="countdown"></h1> tells the timer to be displayed as a heading - you can change this to e.g. a paragraph. style.css determines what a heading looks like.<script src="countdown.js"></script> runs the countdown.js program.How could you use the countdown timer in your own website?
If you have some previous coding experience, and would like to write your own Javascript programs, you can find more information on w3schools.com.