Learn HTML by Building a Cat Photo App - Step 14

My code isn’t working I followed the instructions carefully but it says that I should nest the (a) anchor tag to the ‘p’ element

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 <a _blank href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>

<!-- 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 (Linux; Android 7.1.1; SM-T550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36

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

Link to the challenge:

You are missing the target attribute. You have the value which is _blank, but that needs to be the value of target

So like how the href attribute has the value of the link. Target would have the value of blank

1 Like

Okay sir , thanks a lot

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 <a _blank href="https://freecatphotoapp.com"> cat photos </a> in our gallery.</p>

<!-- 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 (Linux; Android 7.1.1; SM-T550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36

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

Link to the challenge:

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

The instructions was to add the target attribute in the (a) anchor tag and which I did but it says i should nest the (a) anchor to the ‘p’ element

You have to add the target attribute to the tag in the same way as you added the href attribute.

_blank is the value for target in the same way that the URL is the value for href.

Hope this helps!

Putting the target attribute in the ‘p’ element of the (a) anchor tag is difficult

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

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!

Take a look at the img element below the code you’re trying to change.

<img src="https://cdn.freecodecamp.org/..." alt="A cute orange cat lying on its back.">

src and alt are both attributes, and their values are in quotes.

You need to do the same thing for a but with target and href attributes that have values in quotes:

<a target=" " href=" "> </a>

…just with the correct values for target, href, and whatever needs to go between the opening and closing tags.

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