I've written my code on notepad++ but I don't know how to run it so that it works on a webpage
I can’t seem to run my code on a webpage?!
but I don’t know how to run it so that it works on a webpage
what does this mean? You can’t run it by executing menu Run->Launch … (one of the browsers).
Do you have one of those browsers installed? Or do you try to call it with a url containing something like localhost or hostname?