# Help with main id on tribute

**URL:** <https://forum.freecodecamp.org/t/help-with-main-id-on-tribute/450484>\
**Category:** General\
**Created:** [March 10, 2021, 2:45pm UTC](https://forum.freecodecamp.org/t/help-with-main-id-on-tribute/450484 "2021-03-10T14:45:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Medearave](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/medearave/32/218013_2.png) [@Medearave](https://forum.freecodecamp.org/u/Medearave)\
**Post date:** [March 10, 2021, 2:45pm UTC](https://forum.freecodecamp.org/t/help-with-main-id-on-tribute/450484/1 "2021-03-10T14:45:26Z")

</div>

I am having issues getting my test to pass for the id=main . My title id passes, but I have added the id element to different sections with no luck, does it need a close tag? . I am attaching my link to codepen for review.

[https://codepen.io/Medearave/pen/KKNzGEO](https://codepen.io/Medearave/pen/KKNzGEO)

---

<div class="post-metadata">

**Author:** ![kevinSmith](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/kevinsmith/32/72934_2.png) [@kevinSmith](https://forum.freecodecamp.org/u/kevinSmith)\
**Post date:** [March 10, 2021, 2:51pm UTC](https://forum.freecodecamp.org/t/help-with-main-id-on-tribute/450484/2 "2021-03-10T14:51:52Z")

</div>

The error message says:

> My tribute page should have an element with corresponding id=“main”, which contains all other elements.

I see an element that has that id, but it doesn’t “contain all other elements”. They want to wrap all of the page elements.

---

<div class="post-metadata">

**Author:** ![Medearave](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/medearave/32/218013_2.png) [@Medearave](https://forum.freecodecamp.org/u/Medearave)\
**Post date:** [March 10, 2021, 2:57pm UTC](https://forum.freecodecamp.org/t/help-with-main-id-on-tribute/450484/3 "2021-03-10T14:57:56Z")

</div>

I don’t understand what it means to wrap all of the page elements, when I close the tag it still fails the test. Can you give me a generic example? I am a visual learner and the instructions don’t explain this to me.

---

<div class="post-metadata">

**Author:** ![kevinSmith](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/kevinsmith/32/72934_2.png) [@kevinSmith](https://forum.freecodecamp.org/u/kevinSmith)\
**Post date:** [March 10, 2021, 3:05pm UTC](https://forum.freecodecamp.org/t/help-with-main-id-on-tribute/450484/4 "2021-03-10T15:05:44Z")

</div>

To “wrap” means to surround. Your `h2` element with the id doesn’t surround anything except for the text that it contains. They are saying that the element with that id needs to surround everything else. Everything should be inside that. (I think meta stuff for the head doesn’t count.)

So:

```auto
<h2 id="main">Howdy</h2>
<h3 id="not-wrapped">Doody</h3>

```

is wrong, but this:

```auto
<div id="main">
  <h2 id="wrapped">Howdy</h2>
  <h3 id="also-wrapped">Doody</h3>
</div>

```

works. Notice that everything is “inside” the `div`, it is “wrapped”.

---

<div class="post-metadata">

**Author:** ![Medearave](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/medearave/32/218013_2.png) [@Medearave](https://forum.freecodecamp.org/u/Medearave)\
**Post date:** [March 10, 2021, 3:13pm UTC](https://forum.freecodecamp.org/t/help-with-main-id-on-tribute/450484/5 "2021-03-10T15:13:51Z")

</div>

> [@kevinSmith](#):
>
> `<div id="main">`

Thank you ! That worked for me.

---

<div class="post-metadata">

**Author:** ![kevinSmith](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/kevinsmith/32/72934_2.png) [@kevinSmith](https://forum.freecodecamp.org/u/kevinSmith)\
**Post date:** [March 10, 2021, 3:32pm UTC](https://forum.freecodecamp.org/t/help-with-main-id-on-tribute/450484/6 "2021-03-10T15:32:07Z")

</div>

Cool, that works. I was trying to be indirect, but it might be even better to use a [semantic element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/main) instead of `div`.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [September 9, 2021, 3:32am UTC](https://forum.freecodecamp.org/t/help-with-main-id-on-tribute/450484/7 "2021-09-09T03:32:24Z")

</div>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
