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.

JavaScript JavaScript Basics (Retired) Introducing JavaScript Your First JavaScript Program

i don't understand what code to insert where..

when i preview the code work as it should... i think :)

George- Could you post your code?

let me see what you entered

thank you a lot guys! :D

but it still not working.. :( when i press "check work" it says: " you did not call for document.write function" i don't know what that means, and its not explained in the videos...

Colin Marshall
Colin Marshall
32,860 Points

Can you post the code that you're using in the challenge?

1 Answer

Colin Marshall
Colin Marshall
32,860 Points

You have one mistake with your document.write() command. Your header tags are messed up. You have:

document.write("<h\>Welcome to my site</h>");

It should be:

document.write("<h1>Welcome to my site</h1>");

You're missing the number 1 in both of the header tags and there should be no back-slash in the opening/first tag.

Colin Marshall
Colin Marshall
32,860 Points

The video and the code challenge are slightly different. The code challenge does not ask for h1 tags like Dave puts in in the video. This is how the code challenge should look:

<script>
// Write your code here.
document.write("Welcome to my site");
</script>