Add an attribute to the img

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

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>


<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://www.freecatphotoapp.com/your-image.jpg"alt="a business cat wearing a necktie">
<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:** I dont  understsand what I did wrong. Add  an attribute to the image. How?

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.80 Safari/537.36

Challenge: Add Images to Your Website

Link to the challenge:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

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

Also, the more information you give us, the more likely we are to be able to help.


The instructions say;
Within the existing main element, insert an img element before the existing p elements.
Although this will not cause the tests to fail you should pay attention to instructions. In future lessons it will be important.

The instructions further say
Now set the src attribute so that it points to the url https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg
When the correct URL is used, the tests pass.

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

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>


<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://www.freecatphotoapp.com/your-image.jpg"alt="a business cat wearing a necktie">
<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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36

Challenge: Add Images to Your Website

Link to the challenge:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

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

Also, the more information you give us, the more likely we are to be able to help.


This looks like a sample url instead of a real url.

I need help on trying to place cat image.
help what Im doing wrong.

Did you see this part of what I wrote?

What Im doing wrong. dont understand

what is a real url. do the cat suppose to lay on his back. I dont undertstand. do I just place url next to the work image.

You copy-pasted the example url instead of using the url the instructions want you to use:

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

1 Like

Hello
I see the cat is laying down. How do I do that.
You continue to say SRC where do and how do I put src.

Do you see the letters src here?

You put the wrong url in after src=.

The instructions are telling you which url to use:

Im lost still dont understand. So you saying type src://http cat

No.

You used this url:

That is wrong.

The instructions want you to use this one instead:

ok I dont think you understand me how and where do i put src.

Do you see this line right here in your code?

This one I’ve quoted a few times? It looks like it is line 6 in your code.

That line says

Specifically, it says

THIS RIGHT HERE IS THE WRONG URL!

You need to replace that with the URL from the instructions:

Tell us what’s happening:
how do i make a image of a cat .Where do I place a src attribute that points to kitty
Describe your issue in detail here.

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>


<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://www.freecatphotoapp.com/your-image.jpg"alt="a business cat wearing a necktie">
<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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36

Challenge: Add Images to Your Website

Link to the challenge:

You need to use the URL that the instructions tell you to use.

When I fix that, your code passes for me.

Are you still having issues with this? If so, that’s fine.

An <img> HTML tag is used to insert an image. You can do it by giving it a “source” URL. For some reason, they decided to shorten “source” to “src”.

If I have a url like “https://upload.wikimedia.org/wikipedia/en/6/62/Kermit_the_Frog.jpg”, then I can insert that into my html like this:

<img src="https://upload.wikimedia.org/wikipedia/en/6/62/Kermit_the_Frog.jpg">

I can also add an “alt” (“alternative”) attribute, a label that will appear if the image can’t be found or to help visually impaired people, like this:

<img src="https://upload.wikimedia.org/wikipedia/en/6/62/Kermit_the_Frog.jpg" alt="Kermit the Frog">

It will end up looking like this on my final page:
Kermit the Frog

Does that help?

1 Like

Hello Kevin
Im 61 years old not that it matter. However I just want simple steps. How do I place an image. What is src and where and how do I place a cat image. I would like to complete this.
Where do I get an image how do I do this . What do I do first. Where is the url

This is where I’m stuck.
Your page should have an image element.

Your image should have a src attribute that points to the kitten image.

Your image element’s alt attribute should not be empty.