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 trialUnsubscribed User
Full Stack JavaScript Techdegree Graduate 27,351 PointsUnable to link .js files and .css files to a .html file
Hello fellow students,
I'm having trouble linking external files to my .html file.
check out this snapshot of my workspace: https://w.trhou.se/t0jhb78zot
I attempted to link my .css file in the header, and my .js file in the body.
Currently, all the external files are contained in a folder, but originally, they were all in the same folder. I had thought that moving them into a seperate folder might help. It didn't.
Additionally, I've tried writing the .css inside of <style></style> tags, which caused the code to run perfectly! When I ran the .js content inside of <script></script> tags, it ran perfectly.
Thank you very much!
P.S: This issue has occurred before, and then it disappeared abruptly. This time, no such luck! I hope it's something simple!
God Bless, Daley Cody Yakoweshen
1 Answer
Kendell Dancy
15,158 PointsTheres a typo on line 9:
You spelled stylesheet wrong
<link href="Externals/CStyleS.CSS" rel="stlyesheet" type="text/css" media="screen">
Also another typo on line 18:
Looks like you closed the opening <script> tag excluding the ( type='text/javascript' src='Externals/madScript.js' )
<script> type='text/javascript' src='Externals/madScript.js'</script>
It should be:
<script type='text/javascript' src='Externals/madScript.js'></script>
Unsubscribed User
Full Stack JavaScript Techdegree Graduate 27,351 PointsUnsubscribed User
Full Stack JavaScript Techdegree Graduate 27,351 PointsFixed like a charm!
How silly of me!
Thank you so much, Kendell!