Learn HTML by Building a Cat Photo App - Step 12

Tell us what’s happening:
Describe your issue in detail here.
I already crated the link to “cat photos.” I now get the error saying that there should only be one (a) element. How do I get rid of the other (a) element? I don’t see the additional (a) element that the error is pointing to.

  **Your code so far**
<html>
<body>
  <h1>CatPhotoApp</h1>
  <main>
    <h2>Cat Photos</h2>
    <!-- TODO: Add link to cat photos -->
    <p>Click here to view more <a href="https://freecatphotoapp.com"> cat photos.</p>
    <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/104.0.0.0 Safari/537.36

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

Link to the challenge:

The anchor element needs both an opening and closing tag because you can put stuff inside of it.

1 Like

I added the closing tag for the anchor element

but I still get the same error

You need to use the triple back tick method to show your HTML in here. To display your code in here you need to wrap it in triple back ticks. On a line by itself type three back ticks. Then on the first line below the three back ticks paste in your code. Then below your code on a new line type three more back ticks. The back tick on my keyboard is in the upper left just above the Tab key and below the Esc key. Or, if you have the cursor in the editor on a line by itself with no other text, you may be able to use Ctrl + e to create the triple back ticks for you.

You didn’t close this anchor element, which is producing confusing test output.

Edit - oops, that was already said

1 Like

Tell us what’s happening:
Describe your issue in detail here.
I closed the anchor element but the error persists

  **Your code so far**
<html>
<body>
  <h1>CatPhotoApp</h1>
  <main>
    <h2>Cat Photos</h2>
    <!-- TODO: Add link to cat photos -->
    <p>Click here to view more <a href="https://freecatphotoapp.com"</a> cat photos.</p>
    <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/104.0.0.0 Safari/537.36

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

Link to the challenge:

This is invalid syntax - look back at step 11

1 Like

Below is the hint I got, I don’t see any extra anchor element though

Hint

Your code should only contain one anchor (a) element. Remove any extra anchor elements.

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