sorry for the newbie question, but I started my programming adventure two months ago. I have a doubt: a client commissioned me to demo a website (so it would only work offline) and I am making the design. Many pieces are reusable, so I have created elements via javascript to be called in the code. The problem is that while if I start the page from the VS Code live server everything loads fine, while if I in the folder statically open an html file neither the CSS nor the JS loads. I think it is a problem with how they are linked. My idea was to deliver a folder with all the files and I imagined that he clicking would be able to see all the components and navigate through the pages. Any solutions?
Here's an example on how I linked those JS files (it works on live server)
<script src="/components/card.js" type="text/javascript"></script>
"I imagined that he clicking would be able to see all the components and navigate through the pages"- does he ( your client ) have a webserver setup? Has he copied your files to the correct locations in said webserver (if it exists) in order that the paths in your code will exist? Or do you hope that he will be able to run the code using the filesystem rather than proper urls?