Learn HTML by Building a Cat Photo App - Step 15

Tell us what’s happening:
I’m stuck in this step and i have tried everything. Please let me know what I’m doing wrong

Your code so far
<a href “https://freecatphotoapp.com”>A cute orange cat lying on its back.

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>

<!-- User Editable Region -->

      <a href "https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">

<!-- User Editable Region -->

    </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/108.0.0.0 Safari/537.36

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

Link to the challenge:

When you add an attribute to an HTML tag, the syntax is:

<p attribute="value">here is some text</p>

Also, img tags are self-closing but anchor (a) tags are not. You need an opening and closing tag.

1 Like

Yes, the <p attribute=…

is working fine.
It is the anchor (a) tag that I’m having problems with. I have place the closing statement everywhere in the above statement with no luck. I’ll keep trying
Thanks

The code I gave was an example. The syntax for adding attributes to elements is the same whether it’s a p or a or anything else. The syntax you have for your anchor element attribute is incorrect.

Hi @JuanC1 ,
The reason is that you haven’t closed the anchor tag with </a>.

<a href="...."><img src="....."></a>

Hi @isuru.dex
Please see below. I placed the closing statement at the end (and tried at different locations) but still getting an error:

  <a href "https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>

OK. I’ll keep checking

Okay.
You missed the assignment operator = to assign href with the address.

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