It keeps saying " Your code should only contain one anchor (a) element. Remove any extra anchor elements." but i only have one (a) anchor element

Tell us what’s happening:
Describe your issue in detail here.

  **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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36

Challenge: Step 12

Link to the challenge:

Hint : Have u closed your ancor tag?

2 Likes

yes everything looked good

Please check again.
Your anchor tag is not correct here

Take a closer look at your ancor tag
A closed tag implies this

<a href =""></a>

i understand but it asks me to only use the anchor element (a) once

lets rephrase the statement like so for better understanding

use a full ancor tag once
full meaning an ancor tag with an opening and closing tag

2 Likes

ohhh thank you that makes alot more sense

How? We have to open it with p and next a then closed p right ?

(post deleted by author)

The p opening is for the paragraph, the a opening is for the hyperlink. You need to close with a to finish the hyperlink. Once you finish creating the paragraph you will close with p.

1 Like