2. I should see an element with corresponding id="title", which contains a string (i.e. text) that describes the subject of the tribute page (e.g. "Dr. Norman B

Elon Musk

This is the part of my code which is applicable

When a test fails click the red button to see which test(s) are failing and text to help you correct the issue.
Be sure and read more than just the first line of the failing message. The ability to read and comprehend error messages is a skill you’ll need to acquire as a developer. Ask questions on what you don’t understand.

The failing test says

I should see an element with corresponding id="title", which contains a string (i.e. text) that describes the subject of the tribute page (e.g. "Dr. Norman Borlaug").
Element does not contain any text: expected 0 to be above 0
AssertionError: Element does not contain any text: expected 0 to be above 0

Do you understand what the test is looking for and why it fails?

Remember, an id must be unique within the document.

On a side note, codepen only expects the code which goes between the body tags.
All code that the browser renders belongs in the body element.
Mentioning because you have elements out of order. Review this for an understanding of the HTML boilerplate tags.

it’s expecting title to be above 0 which I believe means it should have text which would make it above 0

Yes, but you’re only reading part of the message. The first part says it clearer;
Element does not contain any text:

Element does not contain any text
still learning so I assumed it was one error code
i’m not sure what else it could mean

This was a hint.

In codepen at the bottom of the iframe is a button that says “keys”. Click it and it will give you the shortcut for “find”…and also “find next”.
Use the shortcut and find the first instance of id="title" and then use the find next shortcut to see if you have another one.

also about this can you please elaborate on what you mean

everything seems to be the way I want it on the page
and should’nt the code be as follows

head
header
body
footer

excluding the boilerplate code because codepen has that built in

ok I see now
Thanks for the help I was really puzzled I believed I had everything right I see now I have a second ID=“title”

Follow that link.
As I said, all code that the browser renders belongs in the body element. The header is something that the browser renders, therefore it belongs in the body element, not outside of it.

EDIT: The footer element is also something the browser renders.

Got it
thank you really appreciate your help

1 Like

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