Unable to solve the error

Hello, welcome to the forum.

Please don’t post pictures of code. Please post a link to the challenge and cut and paste the code (putting three backticks, ```, on the line before and another on the line after the code so it formats). In the future, the Get Help -> Ask for Help button will do that for you.

But the failing test is telling you what the problem is.

Can’t seem to solve it

  1. Please post your actual code instead of a picture

  2. Please provide the link to the challenge you are working on

  3. Please provide a meaningful description of what is going on beyond “can’t solve it”

1 Like

Link to the challenge - https://www.freecodecamp.org/learn/responsive-web-design/basic-html-and-html5/link-to-internal-sections-of-a-page-with-anchor-elements

Error on Task 6 - The

footer

tag should have an

id

attribute set to “footer”.
Present code:

<a href="#footer">Jump to Bottom</a>
<h2 id="footer"></h2>

We need all of your code please.

Just copying the error message is better, but not great. Its polite and helpful if you put forth as much effort into asking the question as you want me to put into answering the question.


I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).


The problem, quite literally, is that you don’t have an footer element with the id tag of "footer".

It needs to jump to the footer element, not an h2. So the id footer should be on a <footer> element.

Sorry everyone about not being able to communicate my error to you. Its my first day using FreeCodeCamp and I was not sure.

<h2>CatPhotoApp</h2>
<main>

<a href="#footer">Jump to Bottom</a>
<h2 id="footer"></h2>

</main>

<footer>Copyright Cat Photo App</footer>

This is your h2 element

This is your footer

The footer should have the id, not the h2

Are you able to type in the correct code?

I am not able to get through

Did you understand what I meant by

What changes have you made to your code?

I tried by changing h2 with id:

<a href="#footer">Jump to Bottom</a>
<id="footer"></id>

You should not change the h2 element at all. This challenge isn’t about the h2 element.

You need to change the footer element to add the id with a value of "footer".

My footer:

<footer>Copyright Cat Photo App</footer>

What do I change it to?

You need to add the id with the value of "footer" to that footer.

It’s just like you did with the h2 element, but on the footer instead.

It gives me an error saying - There should be only one footer tag on your page.

I typed in:

<id="footer">Copyright Cat Photo App</footer>

You over wrote the word “footer” in the element tag. It needs to be like:

<footer attribute="value">...

but you’ve done this:

<attribute="value">...

In this case, the attribute is “id”.

It worked. I really appreciate everyone for helping.

3 Likes

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