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

confused

I did what they asked me but I do not understand how to correct this

index.html
<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
</head>

<body>
</body>

<"welcome to my site">
// Write your code here.

</"Welcome to my site">

</html>

1 Answer

Dane Parchment
MOD
Dane Parchment
Treehouse Moderator 11,023 Points

Sorry to say but you are wrong on this one. I recommend that you go back and watch some of the basic html courses, as your html is wrong, also your code does not contain javascript. So with the problem out of the way, let's turn our attention to helping you solve this.

The instruction says to add a script that displays hello world to the website, since the script tags are already written for us, we do not need to worry about adding those, instead we can turn start with the javascript. If you remember the videos leading up to this challenge you should be able to recall the document.write method, this is what we will be using to display the words welcome to my site to the screen.

<script>
document.write("Welcome to my Site");
</script>

If you wanted to be extra fancy you could wrap the text in an html tag like so:

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

Hopefully this helps you out.