Unable to pass the test

I typed the following code:

<h2 id="footer>"Footer and it keeps showing me this: The `footer` tag should have an `id` attribute set to "footer". What am I doing wrong?

Hi there,
Would please send a link to the lesson. you can do this by copy and pasting the exact link on the browser right here in your post.

Sure!

Looks like your quote is in the wrong place

should be <h2 id="footer"> not <h2 id="footer>"

hope that helps!!

First you need to change the link here:

<a href="https://freecatphotoapp.com" target="_blank">cat photos</a>

href has an external link ( refers to another website). you should change this to an internal link ( refers to the id of an element within the page)
to do this change the address to id like this href="#footer"

then remove this part in the a tag target="_blank"
finally, define id for the foot tag. To do this add id="footer" to the footer element.

That’s exactly what I’ve written.
<h2 id="footer"> Jump to Bottom</h2>
but “id” appears to be in red color I don’t know why

Hi! @theoriginalhybrid9
Welcome to the forum

  • You were asked to give an id to the footer element not to the h2 so, the footer element’s id should be footer

  • Also in your jump to the bottom anchor element remove the target="_blank" attribute from the anchor tag since this causes the linked document to open in a new window tab.

Hope this helps :sparkles:

Ah! You are adding the id to the <h2> element.

The footer is way at the bottom - try adding the id to the <footer> element!!!

<footer id="footer">

@theoriginalhybrid9, in the future

If you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

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