HTML & HTML 5: Link to Internal Sections of a Page with Anchor Elements

Hi,

Sorry if this is a really silly query.
I am just going through the tutorial and trying to:

Link to Internal Sections of a Page with Anchor Elements

Iv tried different options and also tried:
<p id="destination">I am the destination of the link</p> &
<h1 id="title">I am the destination of the link</h1>

The error I keep getting is:

The footer tag should have an id attribute set to “footer”.

My code is:

<h2>CatPhotoApp</h2>
<main>

  <a href="#footer">Jump to Bottom </a>
  <h1 id="footer">Footer</h1>
    
  
  <img src="https://bit.ly/fcc-relaxing-cat" 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 Footer</footer>

Please advise what am I doing wrong?

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.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Note: Backticks are not single quotes.

markdown_Forums

1 Like

please include also the challenge link when you ask for help

or just use the Ask for help button, so that you will have a precompiled post with all the useful info in which you just need to ask description of your issues

1 Like

This is the link

the steps in the instructions are:

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”.

And this part you did.

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

And this part you also did

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

This part you didn’t. You created an h1 element and added to it the id of footer, but instead you had to add the id to an element already existing in the page. Notice the “at the bottom of the page” part
You also changed the text of the footer element, which may cause the tests to fail.

1 Like

I did try changing the code at the bottom, as that’s what I had thought originally, had the same error. Not sure what to do now.

how did you change the code at the bottom?
if you do any changes post again your code, and we can see why there is still an error

I did this:

<footer> Copyright Footer</footer>
<h2 id="footer">Footer</h2>

I think somehow, I need to change Id within that first line of code rather, than 2 lines I have currently got. Any advice, not sure how to do that…

you need to change the existing element, not create a new one

1 Like
<id=footer> Copyright Footer</footer>

Like this?

that’s not a valid tag
you want to add an attribute to the tag, not change what kind of tag it is, do you?
the h2 element of above had a correct attribute id set to footer, what did you do differntly this time?

Im so sorry, I really don’t mean to be dim, I don’t understand how to change this

this is an h2 element with an id of footer
there is first the tag name, and then the attribute(s) with its(their) value(s)
instead you need to add the id to the footer element, where footer is the tag name, and you need to add an attribut
see also the colors when formatted as code, should be an hint

1 Like

Thank you

Got It!!!

<footer id="footer">copyright footer</footer>