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 How to Make a Website Beginning HTML and CSS Write a CSS Selector and Property

</style>

add stile

index.html
</style>
<pre><span class="nt">&lt;h1&gt;</span>Gold Play<span class="nt">&lt;h1&gt;</span>
</pre>
</style>

1 Answer

Steven Parker
Steven Parker
231,198 Points

Your example seems unrelated to the challenge, but just looking at the code itself, remember that tags are used in pairs, with these guidelines:

  • opening tags (without /) must come before closing tags (with /)
  • a nested element must have both of its tags inside the enclosing element.
  • HTML should not appear inside a style element (CSS would)
  • the recommended tag for code snippets is code rather than pre

So, assuming your intent is to show what the code for an h1 element looks like (not create an actual h1 element), the code you posted should probably be rewritten as:

<style>
</style>
<code><span class="nt">&lt;h1&gt;</span>Gold Play<span class="nt">&lt;/h1&gt;</span>
</code>