This tutorial's code came from w3schools, didn't it? I mean, it's wonderful that you fleshed out the directions and added in a few extras, but it'd be nice to have a link or a credit to the original site, you know? c:
Yeah it is necessary to specify the source of the script you use from a third party website. Although w3schools does not seem to accuse people of stealing their contents, its still not a good habit to develop, especially if you become so used to not give credits for what you take.
Also keep in mind that w3schools is actually not a very good tutorial site, at least from a professional point of view. Check out tutorialspoints.com if you wish to improve further: http://www.tutorialspoint.com/