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 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,077 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.