How do I create ID

I have edited the code as instructed and tried to edit the footer as per the instructions provided, but it seems to complain about not being able to have more than one footer in my code. I just don’t understand what I am supposed to do anymore. I have edited the code so many times based on the examples I have seen on the forum. Please assist with the right solution.

which hcallenge do you work on?

this is one footer:

<footer></footer>

those are two footers:

<footer></footer>
<footer></footer>

this is a footer with an id:

<footer id='footer-ID'></footer>

When I run the test, I get this error. I don’t know what I am expected to do. I have followed the instructions but it’s not working. Below is the error i am getting and I don’t understand what I am supposed to do now.

// running tests The

a

text should be “Jump to Bottom”. The

footer

tag should have an

id

attribute set to “footer”. // tests completed

You have an

<a href…>

tag somewhere in the code, right? That href points to an ID.
What you have to do is add an ID to the FOOTER. You will end up with something like

<footer id=“your_id”> </footer>

`

Yes. this is the code and footer.

<h2>CatPhotoApp</h2>

<main>

  <a href="#footer">Jump to Buttom</a>

  

  <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">

  <p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff. Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched. Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

  <p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched. Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff. Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

  <p>Meowwww loved it, hated it, loved it, hated it yet spill litter box, scratch at owner, destroy all furniture, especially couch or lay on arms while you're using the keyboard. Missing until dinner time toy mouse squeak roll over. With tail in the air lounge in doorway. Man running from cops stops to pet cats, goes to jail.</p>

  <p>Intently stare at the same spot poop in the plant pot but kitten is playing with dead mouse. Get video posted to internet for chasing red dot leave fur on owners clothes meow to be let out and mesmerizing birds leave fur on owners clothes or favor packaging over toy so purr for no reason. Meow to be let out play time intently sniff hand run outside as soon as door open yet destroy couch.</p>

</main>

<footer id='footer-ID'></footer>

AND THIS IS THE ERROR I GET WHEN I RUN A TEST.

// running tests The

a

text should be “Jump to Bottom”. The

footer

tag should have an

id

attribute set to “footer”. // tests completed

Please provide a link to the challenge.
Also when posting code use the “</>” symbol above the text to format it as code, instead of it getting rendered as html.

Thanks for the pro tip. This is my first day on a journey to the world of coding.

Did you post disappear? I cannot see your code anymore >.<
Thanks for the challenge link, not I can see what is asked of you, but now I need your code to see where the problem might be ^^°

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

please provide your code, otherwise it is not possible to help you

edit: I approved your post with the code


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 (’).

almost there, make sure the text match the requirements

also here, you need an id with falue of footer, not of footer-ID

1 Like

Hi jtdaniels008,

In your a href tag you have ="#footer" so for this to link to the footer then the id has to be identical to what comes after the # in the a href.

you have named your id =“footer-ID” … this is totally different to “#footer” so it cant find it.

hope that makes sense :slight_smile:

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