I can't get cat photos to show

Tell us what’s happening:
Describe your issue in detail here.
I don’t know why I can’t get the cat image to show up. Before I could at least get the first image to show up, but now I can’t get either of them to show up. I’m ready to give up.

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>
<img scr="https://www.freecatphotoapp.com/your-image/jpg" alt="a business cat wearing a necktie">

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
</main>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36

Challenge: Add Images to Your Website

Link to the challenge:

You have two issues.

The instructions were:

Now set the src attribute so that it points to the url https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg

First of all, you have “scr” but it should be “src”. It’s short (I assume) for “source”.

The second problem is that you have to use the url that they gave you in the description.

When I fix those problems, your code works and passes for me.

I changed scr to src and it still isn’t showing. I’m pretty sure I have the URL in correct, so I don’t know why it won’t show. The first picture of the cat in the tie shows, but not the second picture of the kitten.

I actually got the second image to show now, but the tests are still saying there isn’t a source that points to the URL. I don’t think I misspelled it again.

Again, if I make the two changes I outlined above, the code passes for me.

You have to use the url from the description to pass. Cut and paste it.

If you still can’t pass, please paste the code you have at this point so we can pinpoint the problem.

I don’t know how to send my code. I tried to copy and paste, but then I couldn’t send the reply.

You should be able to cut and paste it into the your reply to this thread.

If you put three backticks (```) on the line before and after the code, it will make it look nice.

Hi.

Please stop making new posts. :grinning:

Here is how to write code into the forum.

When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

1 Like

Please don’t post a solution. We are about learning - we try to help them out bit by bit.

3 Likes

@kevinSmith is correct.

You shouldn’t post the full solution.
Instead provide hints.

But now you know how to write code into the forum for future posts.

1 Like
<h2>CatPhotoApp</h2>

<main>

<img src="https://www.freecatphotoapp.com/your-image.jpg" alt="A business cat wearing a necktie.">

  <p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

  <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A relaxing cat.">

  <p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

</main>

Your code should only have one img tag.
Not two.

You need delete one.
Delete the one with the incorrect url.

Try to guess the correct URL and write it in a correct place. It will work

1 Like

Than you! Much appreciated.

Does that mean I am only supposed to have one picture up?

1 Like

I think it worked. It seemed to only want one image and didn’t reject my code after I deleted an image. That confused me because I didn’t know I was supposed to delete the first image from the earlier problem.

Yes, but you have to choose the correct one according to the instruction given there.

Okay, I think I get it now. Thanks again.

1 Like

URL source can be validated or cross-check the source url.

The starter code for this problem should not have had an image. The image there may have been from an earlier attempt to solve this problem.

But I’m glad you were able to solve it.