Tell us what’s happening:
I can’t figure out how to add the id tag
Your code so far
<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>
<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:
Have a close look at the exmaple code from the lesson:
Now, apply the same sort of syntax to the
Hope this helps
The problem is I don’t understand how to apply the same syntax to the tags
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
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
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
for example if I had to put the
for attrbitue of an element to
love I would just
<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:
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.