Learn HTML by Building a Cat Photo App - Step 10

Tell us what’s happening:
Trying to add the anchor element but I’m stuck

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->

<!-- User Editable Region -->

      <p>See more cat photos in our gallery.</p>
      </a> href='https://freecatphotoapp.com'

<!-- User Editable Region -->

      <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/605.1.15 (KHTML, like Gecko) Version/16.5 Safari/605.1.15

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

Link to the challenge:

Hello and welcome!

There are more then one issues here:

  1. You used an closing anchor tag as an opening one
  2. Make sure to use the href-attribute inside the opening anchor tag like <a href="..">
  3. use double quotes for the href-value
  4. delete the space after the opening anchor tag
  5. your closing </a> is missing
  <a href=“https://freecatphotoapp.com”>

This is what I have now. But I think I’m stil missing something

Please post the complete code with your changes. Thank you!

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->

<!-- User Editable Region -->

      <p>See more cat photos in our gallery.</p>
      <a href='https://freecatphotoapp.com'>

<!-- User Editable Region -->

      <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>

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

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->

<!-- User Editable Region -->

      <p>See more cat photos in our gallery.</p>
      <a href='https://freecatphotoapp.com'>

<!-- User Editable Region -->

      <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/605.1.15 (KHTML, like Gecko) Version/16.5 Safari/605.1.15

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

Link to the challenge:

Please Tell us what’s happening in your own words.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more you say, the more we can help!

You forgot to add the closing tag </a>. Even if there is nothing between the two tags, they are both required.

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->

<!-- User Editable Region -->

      <p>See more cat photos in our gallery.</p>
      <a/> href='https://freecatphotoapp.com'>

<!-- User Editable Region -->

      <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>

So the problem I think I’m having is placement where the anchor is suppose to go after the paragraph, but at the same time I feel like I’m still getting something wrong.

Can you describe how your anchor element looks different from the example?

For example, <a href='https://freecodecamp.org'></a> would link to freecodecamp.org.

See that’s the problem everytime I go to check the code it still says it is wrong

It says I need a closing tag after < character, but even when I do it still says it is wrong

Like I said… please describe in words what the differences are between your code:

and the example code:

For example, <a href='https://freecodecamp.org'></a> would link to freecodecamp.org.

1 Like

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