Learn HTML by Building a Cat Photo App - Step 12

Tell us what’s happening:
I am having the hardest time trying to figure out what I am doing wrong

Your code so far

<html>
  <body>
    <h1>CatPhotoApp</h1>
    <main>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p> <a href="https://freecatphotoapp.com".>Click here to view more cat photos.</p>
      <a href="https://freecatphotoapp.com"></a>
      <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">
    </main>
  </body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36

Challenge: Learn HTML by Building a Cat Photo App - Step 12

Link to the challenge:

The instructions did not tell you to change this anchor element. I would put it back the way it was.

This is not a valid anchor element. If you reset the code, you can look at the valid anchor element that you finished on the last Step.

1 Like

ok I’ve reset the code. Can you please tell me what I am doing wrong

Notice a few things here:
1- your anchor tag is not closed.
2- the missing closed tag should go somewhere on this line that makes sense to the problem you are working on
3- the anchor tag only needs to go around the last two words of the paragraph not the whole thing.
4- the anchor opening tag has a lost period inside which is not supposed to be there

Try to go thru this list and see if you can make more progress…

Once you reset the code you should try creating a valid anchor element inside of the p element.

I don’t understand what I am doing wrong

What did you try after you reset the code?

The entire correct anchor element you have should be duplicated to turn the words ‘cat photos’ in the p element into a link.

 <p>Click here to view more cat photos.<a href="https://catphotos.com"></a></p>
      <a href="https://freecatphotoapp.com"></a>

So you again changed the second line right after resetting the code because you were not supposed to change the second line? That doesn’t make sense to me.

I would

  1. reset the code again

  2. touch absolutely nothing about the current anchor element

  3. add a duplicate anchor element inside of the p element, replacing the text ‘cat photos’

I’ve edited your code 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.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

Pre-formatted-text

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

still working on it !

<p>Click here to view more cat photos.<a href="https://freecatphotoapp.com"></a></p>
      <a href="https://freecatphotoapp.com">cat photos</a>
  <p>Click here to view more cat photos.<a href="https://freecatphotoapp.com"></a></p>
  <a href="https://freecatphotoapp.com">cat photos</a>

Vs

These are not the same.

I didn’t touch the second line

 <p>Click here to view more cat photos.<a href="https://freecatphotoapp.com">cat photos</a></p>
      <a href="https://freecatphotoapp.com">cat photos</a>

Closer. You have the text ‘cat photos’ twice. You should only have it once.

<p>Click here to view more cat photos.<a href="https://freecatphotoapp.com"></a></p>
      <a href="https://freecatphotoapp.com">cat photos</a>

Vs

These are not identical

… Maybe going back to code you know is wrong doesn’t make any sense?

I would suggest you do this.

  • Restart.
  • Cut (or copy and delete) the a element.
  • Select the cat photo text in the p element and paste the a element in place of it.

Example:

<p>Visit the freeCodeCamp forum.</p>
<a href="https://forum.freecodecamp.org/">freeCodeCamp forum</a>

Becomes:

<p>Visit the <a href="https://forum.freecodecamp.org/">freeCodeCamp forum</a>.</p>
1 Like