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 trialDavid Joseph-Goteiner
1,984 PointsPlacement of Script in CSS vs. JS
Why are I typing code into CSS script as opposed to JavaScript?
Thanks!
D
David Joseph-Goteiner
1,984 PointsI'm generally confused then! The code test wanted me to add "var = " code into CSS script area of the HTML index... I thought "var" belonged in a .js file or at least the .js <script> area in HTML index.
Thomas Ireland
Courses Plus Student 8,216 PointsI agree with Jeff. Looking at the code challenge, the link to the css file is above the opening <script>
tag. As long as your Javascript is between the opening and closing script tags e.g. <script> your code goes here </script>
, you will be fine.
1 Answer
Wendell Pulsipher
10,183 Pointsyes I think you are definitely confusing script tags with style tags. Watch the video carefully and you will see that there is no such thing as a "CSS script" area.
Jeff Busch
19,287 PointsJeff Busch
19,287 PointsI think you are confusing
with