Home > Enterprise >  When trying to open the html file via a browser, it cannot find the /img or /js folder
When trying to open the html file via a browser, it cannot find the /img or /js folder

Time:01-19

Project path js path reference imgs path reference

It works when I launch the page on the ide built in browser, but not when I open it directly from my files. Am I doing something wrong with how I have the paths setup? Im new to working with css and javascript, if its something simple I apologize.

CodePudding user response:

Please remove the leading slash within the src attribute of your img tag to load images from a folder that is on the same level of the folder hierarchy as your HTML file. It has to look like this:

<img src="images/thinking.jpg" ...></img>
  • Related