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.
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.
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.
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.)
<h2 id="main">Howdy</h2> <h3 id="not-wrapped">Doody</h3>
is wrong, but this:
<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”.
Thank you ! That worked for me.
Cool, that works. I was trying to be indirect, but it might be even better to use a semantic element instead of