Code help please

Tell us what’s happening:

I can’t figure out how to add the id tag

Your code so far


<h2>CatPhotoApp</h2>
<main>

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

<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 Cat Photo App</footer>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0.

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

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

Welcome, nala.

Have a close look at the exmaple code from the lesson:

<a href="#contacts-header">Contacts</a>
...
<h2 id="contacts-header">Contacts</h2>

Now, apply the same sort of syntax to the a and footer tags.

Hope this helps

The problem is I don’t understand how to apply the same syntax to the tags

Adding an id is the same, no matter what type of element it is.

<h2 id='h2-id'>I have an ID</h2>
<a href='#' id='my-link'>I have an ID</a>
<p id='super-cool-paragraph-id'>I also have an ID</p>

So do I leave the url in the id?

The order of href and id do not matter. You are not supposed to add a url to the footer though.

I’m really trying to understand this, so in the href from the previous lesson there is a link, but in the example code there isn’t one, so I don’t understand what I’m suppose to do with it.

The point of this lesson is to show you that you can use the href to “link” to a section of your page using an id in addition to “linking” to an external page with a url.

That still doesn’t tell me what I’m suppose to do with the link, or how to do the rest of the code

Read the instructions again carefully.

Change your external link to an internal link by changing the href attribute to “#footer

Sorry to be such a n00b, but I’ve never done anything like that before and I’m clueless

Read the instructions slowly and carefully and do each instruction, one at a time.

Since I’m stuck at step 1 because I’ve never changed a #href attribute that’s kinda hard to do

What are you stuck on?

I don’t know how to change the #href from the URL that is there to the #footer

replace the text inside the quotes
you set the value of an attribute just with attribute_name="attribute_value"

for example if I had to put the for attrbitue of an element to love I would just for="love"

<a href=“id=”#footer" like this?

No. Read the instructions.

To create an internal link, you assign a link’s href attribute to a hash symbol # plus the value of the id attribute for the element that you want to internally link to, usually further down the page. You then need to add the same id attribute to the element you are linking to. An id is an attribute that uniquely describes an element.

Below is an example of an internal anchor link and its target element:

<a href="#contacts-header">Contacts</a>
...
<h2 id="contacts-header">Contacts</h2>

The instructions might as well have been written in Greek or any other language besides English because if I understood them we wouldn’t be having this conversation,

The link has an href property. The value of that property is in quotes. Put your mouse after the first quote. Click. Hit the “Delete” key until you get to the next quote. Type “#”. Then type the id value you are told to use.