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

HTML

Why I can't complete the code of Challenge task 1 of 3 on Stage 1 Beginning with HTML and CSS?

I follow the instructions as accurate as I can and do alternate the way I do it obviously because the original doesn't work... so what's the problem?

It looks like this:

Challenge task 1 of 3 We're starting out with an <h1> element and a <body> element. Add a <style> element just above the <h1>. Important: The code you write in each task should be added to the code written in the previous task.

.<body> . <h1>Nick Pettit</h1> .</body>

so I'm like

.<body>
.<style> . <h1>Nick Pettit</h1> .</body>

But it keeps on saying that I'm wrong

Hey Max, please edit your post to include your code so we can help.

the actual code is <body> <h1>Nick Pettit</h1> </body>

so I'm like

<body> <style> <h1>Nick Pettit</h1> </body>

Max Gutiérrez, I have edited your post to change the category to HTML so that answers may be upvoted and you may selected a best answer.

4 Answers

I checked out the task, and it says you need to add a style element to the headline.

So it should look like,

<body>
  <style></style>  
  <h1>Nick Pettit</h1>
</body>

Thanks a lot Nhattan Duong and Ethan Lowry !

God damn it I can post the actual code in the forum idk why

Try putting the code between backticks ( ` ) .

<body> <h1>Nick Pettit</h1> </body>

and I'm like

<body> <style> <h1>Nick Pettit</h1> </body>

Btw Nhattan Duong how did you do that? screenshot? or is there a special command to paste whatever line of code your working on into the forums? #KeepItCoolWithTheNoob

^That. Just type in ```` around the code and a blank line in between. The key is the same key as the ~ in the upper left of the keyboard.