I’m trying to do my first project. The first test is to “have an element with a corresponding id="main" which contains all other elements.”
So I wrote the HTML:
<main id="main">
</main>
I am not clear if the “corresponding” id means it’s contained within the HTML, corresponding to the element, or is it a CSS selector “corresponding” to the Main element?
Also, should we start the code with <!DOCTYPE html>?
And should we be wrapping the Main element in a Body element? Generally speaking, should we be following the user story indications exactly, or follow the instructions we learned in the HMTL curriculum?
In any case, my first test is failing. Any help would be appreciated!
Ok- so is my code merely incomplete, or incorrect? Because it states “As you fulfill each test case, you will see them go from red to green.” So am I missing a required element to add an id to the main element? Or is the expectation that I should attempt to complete all the user stories prior to running a test? (I would prefer to see that I’m doing it correctly as I go along)
Well, it seems the title element needed another element. But I don’t understand why I’m putting an element with an id of “title” into the body of the HTML, when we were instructed to to put that in the head of the HTML?
Thank you both for the help. It seems to be passing now that I added text within main section… If I have more problems, then I’ll paste a link to the pen.