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 HTML Basics Going Further with HTML Linking to Sections of a Web Page

Will it matter if I don't put the <id> tag inside the <section> tag?

I placed the div tag outside the section tag. Is this code ok?

 <id>
    <section>
    <h2>About this site</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed accumsan molestie ante eu pellentesque. Aenean dignissim laoreet magna, eu convallis neque faucibus et. Proin eget nulla sit amet dui cursus volutpat sed nec orci.</p>
      <figure>
      <img src="img/vr-space.jpg" alt="user experiencing space in VR">
      <figcaption>

Virtual Reality users can feel like they're right in the middle of the action </figcaption> </figure> </section>

</id>

1 Answer

Steven Parker
Steven Parker
231,269 Points

There is no "id" tag name. But there's a property named "id" that can be used in a tag. It might look like this:

    <section id="about">

The "id" property always has an associated value, in this example it is "about".

Thank you, that makes sense. It is a property of a tag that's why it should be inside an element. I explored using it outside the section tag earlier and did not work. That explains it.