I’m trying to make the words “cat photo” as a link but I can’t seem to catch what I’m doing wrong here.
Your code so far
<!-- TODO: Add link to cat photos -->
<p>Click here to view more <a href="https://freecatphotoapp.com">cat photos.</p>
<a href="https://freecatphotoapp.com">link to cat pictures</a>
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">
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/16.0 Safari/605.1.15
Challenge: Learn HTML by Building a Cat Photo App - Step 12
Link to the challenge:
You are close and there are a few ways to do this. You could change the text on the
<a> tag potentially but that may not satisfy the instructions fully.
You might want to look at wrapping the
<a> tags around the tag you currently have written ‘cat photos’ under. The parent-child relationship of elements will extend the ‘clickability’ of the
<a> tag onto the
<h> tag since the
<h2> would be a child of
hope that helps a bit.
I tried this and it seemed to display correctly in the browser, but it didn’t satisfy requirements.
Do you mean wrap “a” attribute around “cat photos?”
Because I tried this and it displayed correctly, but didn’t satisfy requirements.
you are missing the closing anchor tag
Before “cat” or after "photos? I tried both already and it didn’t work either
The anchor tags tell the browser which words you want to make into a link.
So if you want “cat photos” to be the link you must put the anchor tag after photos (but before the period for eg if one exists)
Yes this was it! I actually removed the period altogether and it worked. But I went back and added the anchor before the period. That was driving me crazy. Thank you!