I've reached up to step 12... and in the step 12 they say to include only one (a) element... and i think I've done it but it keeps saying my code is wrong

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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.115 Safari/537.36

Challenge: Step 12

Link to the challenge:

2 Likes

Remove the dot, close the anchor tag and it should pass.

2 Likes

Hi @nithilanewanjith

<p>
This is text, <a>this is text inside a p element and is also a link</a>
</p>
<p>
This is another text, <img  src="workplace.jpg" alt="Workplace">the image before is also a link</a>. I hope this examples will help you to understand the anchor element syntax.
</p>

The p element is a block element (it sits in a new line, because it takes all the available space, from left to right)
and the anchor, a, element is an inline element (like a word or a white space, it sits side by side with other words and inline elements, and only takes the space that its content needs).
References:

Happy coding! :muscle: :sunglasses: :hugs:

1 Like

did you ever figure this out ?

Click here to view more cat photos

You only have to show it like so…
—that’s it!

3 Likes

Yes this was the solution. :man_facepalming:

1 Like

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