For module 2, the class was asked to create an index.html page for the 0fees site account we’d created in module 1. My page is here:
Most of the assignment was review – make a web page, include a title, text, and an image, etc. New for me was adding JavaScript to the page. I didn’t try to do anything fancy – the example given used document.write(), so I used that too. Uploading the page and image wasn’t difficult – I have a lot of past experience working with sites via ftp and sftp.
One element I did pause to research was whether or not to embed the javascript code in an HTML comment. One slide in the presentation showed the code without the comment, but another slide and the assignment example did include it. From what I gathered (mostly from looking at StackFlow questions on the subject), leaving the comment out is a good idea. Modern browsers know about the script tag so they won’t display the text inside, and there are occasional cases where the comment can cause issues (like not being able to use “–” to decrement in the code).
I also felt that I should use an original image instead of dealing with potential copyright issues by borrowing one. I am, unfortunately, a terrible artist.