LilySakai_Johns (2)

How do you link JS to HTML? I am reeeeeally confused!

You are viewing a single comment. View All
a5rocks (781)

<script src="/<filename_including_directory>"></script> or put all your javascript in aforementioned script tag like this:

alert('Hello there!')
malvoliothegood (632)

@a5rocks Also, the script tag needs to be in the head section of the HTML web page. If you create a new HTMLO/CSS/JS repl the tags to link the style.css and script.js files to the index.html file are already there.