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 Treehouse Club: JavaScript Car Sounds Introduction to the HTML Document and Uploading a Picture

I am on the javascript section and need to know where to insert the code into my page?

This section is in the beginning videos and I just am not sure where to put the code when inserting it into the index.

1 Answer

Hi Constance,

Are you wanting to know where to insert your script tags in your HTML? If so there are 2 common places and it really depends on what your script is going to be doing.

First is in the head and the other (and more common) is just before your closing body tag.

I hope this helps. If I have misunderstood your question please let me know!

-Shawn