I'm stuck on step 12 help

I’m really having a hard time with this step

Your code so far

    <h2>Cat Photos</h2>
    <!-- TODO: Add link to cat photos -->
    <p>Click here to view more <a href="cat photos"</a>
    <a href="https://freecatphotoapp.com">cat photos</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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36

Challenge: Step 12

Link to the challenge:

1 Like

<a> should indicate the link’s destination, and we do that by setting the destination in the href attribute.

So when you tried to make cat photos a link, the text stay as is. you need to warp cat photos around the <a> tag.

After you have wrapped cat photos, set the link destination to https://freecatphotoapp.com, the same destination as the old link, then delete the old link <a href="https://freecatphotoapp.com">cat photos</a>.

href=“cat photos”
still not working…

Click here to view more

1 Like

When you wrap something around any HTML tag. You cover it, and it considered a innerText like Hello World.

<title>Hello World</title>
<p>Hello World</p>
<a>Hello World</a>

If you add something inside that tag, it will become an attribute like href for class id

<p class=""></p>
<a href="" id=""></a>

cat photos is an innerText, not an attribute

Use anchor element once and add the link to the page inside href and add ‘cat photos’ as link text to the href page. Like below

It’s good that you solved the step, but it’s better to help him answer it himself instead. @m.kaviya

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