JavaScript and Html

I've been learning html, css, and JavaScript in the last 6 months. I've decided to take a step forward and make a simple browser game. The only problem is, I don't really know how to link a script of java to an html document. If anyone knows how, I could use some help. Also, if I link a JavaScript document to an html document, can variables from the JavaScript document be used in the html document? JavaScript is new to me and I'm still learning how it works. I would really appreciate it if anyone could help respond to my questions. Thanks :)

Comments

  • I would guess so, but I only know java
  • Chief SoloChief Solo Member
    edited November 2018
    @Log_er , I have learnt just a little bot of JavaScript and a tiny amount of HTML, but I’m pretty sure to include JavaScript in HTML, you have to write it in
    < script > < /script > (without the spaces)
Sign In or Register to comment.