I am stuck at footer. everything else is correct but I'm told my "the foster tag should have and id attribute set to "footer"

Tell us what’s happening:
Describe your issue in detail here.
I need help understanding what I’m being asked to do because my brain is absorbing the question but its not digesting it. this is what I have: <a href="#footer"
id=“footer”
and I’m told the footer should have an id attribute set to footer. how can I figure this out?

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>

<a  href="#footer">jump to bottom</a> id=footer

<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>Copyright Cat Photo App</footer>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15

Challenge: Link to Internal Sections of a Page with Anchor Elements

Link to the challenge:

Reset the code because this line is a bit messy.

The goal is to create an internal link and you can do this by inserting an ID into your <a> tag. However the link needs to find the footer ID somewhere on your page and this is where it seems you’re having issues.

Take a close look at the instructions and try to self debug. Which part of your code is it telling you to insert the ID of footer into?

2 Likes

This is your footer and it clearly doesn’t have any attribute.
An “attribute” is the word you write within a tag, followed by something in paranthesis. Like <a href="#footer">....</a> is an a-tag with a href-attribute and the value of “#footer”.
Now do this in the footer-tag, with the id-attribute and the value “footer”.

1 Like

Hi hackerEd,

I think the confusion for you here may be because the footer at the bottom already reads ’ footer’ inside the tags so you are wondering why this wont work.

You have to give all elements an id if you want them to have one. The fact that it is already named a footer does not matter, which can all be a bit confusing at first.

Let me know how you get on with this. Good luck

1 Like

I’m being asked to add an id attribute with the value of footer to the footer. help…

I’m being asked to make an id attribute with the value of footer to the footer tag. yes I am confused. help…

An ID is a attribute you can add to a tag. However attributetag.

You have a footer tag in your code but that tag doesn’t have an ID attribute.

The instructions are asking you to create an anchor tag that links to another tag with a ID attribute set to footer.

Currently your footer has no ID attribute. What does your footer tag need so that your anchor tag can link to it correctly?

EDIT: looks like I was incorrectly using parameter as a reference instead of attribute

1 Like

<footor>
this is what I put to no avail:

 <h2 id="jump to bottom"</h2>

<h2 id="footer"> </h2> nothing.

ty thank you so much for your patience and helping me. I ended up watching the video on how to do it and I finally got it. :ok_hand:

1 Like

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

1 Like

I’d recommend resetting the challenge and we’ll go through it step by step:

Instructions:

  1. Change your external link to an internal link by changing the href attribute to #footer and the text from cat photos to Jump to Bottom .

  2. Remove the target="_blank" attribute from the anchor tag since this causes the linked document to open in a new window tab.

  3. Then add an id attribute with a value of footer to the <footer> element at the bottom of the page.

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

  1. Change the href attribute, https://www.freecatphotoapp.com to #footer and change the visible text from cat photos to Jump to Bottom.

  2. Remove target="_blank" from your code because that causes your link to open in a new window and you want to link to something on the current page.

<footer>Copyright Cat Photo App</footer>

  1. This <footer> tag is missing an ID attribute. Your anchor tag at the top of your code is trying to link to a tag with an ID of footer, and right now nothing has an ID of footer.

I hope this clears up where you’re having troubles. Let us all know if you need it clarified further.

I’m super happy you figured it out! Although, I would make sure you understand where you went wrong and that you’re not simply trying to find the solution to move forward. These are the important building blocks you’ll be using regularly as you code, and I want to make sure you have a solid understanding and foundation.

If you felt as if you learned from watching someone find the solution, then by all means. Good luck on your journey, my friend.

yes i didn’t want to watch someone do it and not even kidding it took me a while to say f* it and see the video and after I did I realized what I was doing wrong so it definitely helped a ton. you are right though, watching someone figure it out when I couldn’t made me feel a bit incompetent and it does suck that I couldn’t figure it out on my own but hopefully with practice and time I can get better. thanks again.

You are fatigued from staring at the screen overthinking and analyzing.

Get up, and move around, drink some water. Walk away from the problem at hand and do something different for a little while.

So often solutions come to us when we are nowhere near a computer.

2 Likes

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