Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Link to JS file in html not working

The following link in my index.html to a JS file does not work, none of the javascript runs and nothing shows up in the file structure in developer tools:

<script src="js/script.js" type="type/javascript" charset="utf-8"></script>

The following does work however:

<script src="js/script.js"></script>

Does anyone know why this would be?

1 Answer

Is your html file in the main folder?

Yes it's a separate file inside of the main project folder