Tried this. Copied the code. Saved as HTML. Opened it in my browser. Nothing. Just looking at a piece of code. Checked the code three times, letter by letter. Tried different browsers. Checked if javascript was enabled in my browsers. Checked the code again. Nothing. Still just looking at a piece of code that does…