JS file not connecting to index.html

I don’t know if I’m just tired but for some reason I cannot get the most basic step in web development to work, i.e. linking my JS file to the index.html page. I’ve been working through a project and each step is broken into separate folders. For each step (which has all files self-contained) I used python’s http.server functionality to view the page.

Older projects (which worked fine):

New project that is only showing HTML elements, not JS logic:

I tried linking index.html to main.js and mainPractice.js. I tried linking it to a completely empty file with only an alert. Nothing worked.

This has to be something simple but I just cannot see it.

It looks like you have forgotten the ending quote mark on you script tag.

1 Like


Thank you @austinmoore1492

1 Like