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 trialPaul Casperson
985 PointsI'm lost writing this code for the body
Challenge Task 1 of 3
Start by writing an opening and closing body tag below the closing head tag, and above the closing html tag.
I have no idea how to proceed. I wish there were a few examples provided in the lesson
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Once Upon a Time</title>
<style>
h1 {text-align:left; color:green}
</style>
</head>
</html>
4 Answers
Kevin Faust
15,353 PointsHey Paul,
See this code?
</head>
</html>
Its asking you to insert a opening and closing body tag. It would simply look like this:
</head>
<body>
</body>
</html>
Jim Withington
12,025 PointsHi Paul Casperson ,
You'll want to start by putting a body tag (both the opening and closing tag) in the space provided.
Remember: your opening tag will have <> and your closing will have </.>.
Hope this helps!
Paul Casperson
985 PointsHi Jim, thanks,
An opening tag is the first few words? And the closing tag is last few words?
Again, using a baseball game as an example for a writer. <The yankees won an important game last night to keep their playoff hopes alive> this is an opening tag?
If they can win their final two games, they make the playoffs.> This is a closing tag? the final words used in the bodY?
Paul Casperson
985 PointsHI Jim, I'll show an example, Perhaps you can tell me if correct:
</head> <body> </body> <The Yankees won an important game yesterday and now have secured a playoff spot.> </html>
Paul Casperson
985 PointsPaul Casperson
985 PointsThanks Kevin, I still have some quick questions. What's a body tag? A tag is like a header? Or is it actual text in the body ? Second, can you help me with an example? Lets say you were a baseball writer and the body explained how the yankees won the game last night. Might it be something like this:
</head> <The Yankees won a dramatic game last night to keep their playoff hopes alive.> </body> </html>
Like that?
Kevin Faust
15,353 PointsKevin Faust
15,353 PointsHey Paul,
A body tag is generally where we put all the main content of our website inside and so we can separate the main content from the head tag content. So yes this is where the actual text of the website is stored. As you can see in the head tag, that just contains some information about our website but it doesn't provide any visible results. And I cant see your example. I think you might've posted it incorrectly.
Paul Casperson
985 PointsPaul Casperson
985 PointsHI Kevin, I'll show an example, Perhaps you can tell me if correct:
</head> <body> </body> <The Yankees won an important game yesterday and now have secured a playoff spot.> </html>