Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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
215,939 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>