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 trialJeff Bryant
79 PointsAdd code inside the <script> tags to write the words "Welcome to my site" onto the web page.
What do I do
colinjames
12,576 PointsThe script tag is typically where you either link to another JavaScript file (using the src attribute) or write your own JavaScript code in page.
To write the words "Welcome to my site" on your page, you will want to add HTML tags within your body element. Something like this...
<body>
<h1>
Welcome to my site.
</h1>
</body>
jacobproffer
24,604 PointsHey Colin,
This specific challenge is asking the user to utilize the write method (This is a JavaScript course).
2 Answers
jacobproffer
24,604 PointsTo write to the document in JavaScript, we use:
document.write("This is an example.");
I'd recommend re-watching the video on writing your first JavaScript program.
Jake Lundberg
13,965 Pointsuse document.write() to print the text onto the page. You will place this within the <script></script> tags.
Hope this helps!
Ryan Boone
26,518 PointsRyan Boone
26,518 PointsPlease post the code you're having trouble with.