Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Mirali Mirzayev
1,980 PointsHTML Set up
Hello Everyone could you please help me out with my HTML syntax in Atom:
<!DOCTYPE html>
<html>
<body>
<script src = "helloworld.js"></script>
<p></p>
</body>
</html>
JavaScript is not printing out into the screen because of something wrong here.
Thank you in advance.
1 Answer

robin blaauw
2,062 PointsCould be a simple problem of not referring correctly to where your javascript file is located. I always put my javascript files in a JS folder. Assuming you're working in the root folder of your project the pathing would be <script src = "js/helloworld.js"> or if you're in another folder and want to move up a directory first you could put down <script src = "../js/helloworld.js">.
If it's a problem with actual code please put down the code form your helloworld.js
Justinas Vebra
1,053 PointsJustinas Vebra
1,053 PointsThis is the correct HTML to begin with:
I assume you wanted to print out some text with the help of JavaScript, so just add this part to the helloworld.js file:
document.write("Hello, World!");
Again, the JavaScript part is shown because of the assumption. Let me know if this is helpful or more information is needed.