Please I'm stuck on adding an image to my code.please can someone help me out?

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

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>
<img> src=relaxing-cat.</img>
<img>"alt relaxing-cat”</img>

<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 (Linux; Android 9; SM-G955F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.101 Mobile Safari/537.36

Challenge: Add Images to Your Website

Link to the challenge:

This is what you were given as an example:

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

I added some spacing for readability, but HTML doesn’t care.

Here is what you have:

<img> src=relaxing-cat.</img>
<img>"alt relaxing-cat”</img>

Do you see that the format of yours does not match the example?

Try again and see what you come up with.

2 Likes

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

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>
<img src= https://www.freecatphoto.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 (Linux; Android 9; SM-G955F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.101 Mobile Safari/537.36

Challenge: Add Images to Your Website

Link to the challenge:

You’re getting closer. This is the example:

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

This is what you have now:

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

Pay attention to the quotes, and I don’t think that is the url you are supposed to use.

Thank you, which url am I supposed to use please?

The instructions say:

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

An tag always needs an alt description and a source (src). The source is, as you’d expect, the link to the image/media you want to display. The ‘alt’ argument is used to describe what the media portrays. For instance, when you have a url (src) that links to a sports car, your alt would be something like: alt=“Picture of a sports car”.

That’d be something like:

<img src="https://media.istockphoto.com/photos/illustration-of-generic-red-sports-coupe-car-on-white-background-picture-id1006541592?k=20&m=1006541592&s=612x612&w=0&h=QA8QrYO24Skff4l2-Matzvj7U2kO1zSQ8JdCt0L8aJM=" alt="A red sportscar">

Let me know if you have any other questions.

Thank you very much let me try it out

Ok,thank you so much

Should I go get a url of a kitten from another site and insert it on my code I’m confused :thinking::confused: it’s still not working

No, read the exercise again. The link to the cat picture is already given (
https://www.freecatphotoapp.com/your-image.jpg)

Yeah, use the url given in the instructions. The other urls offered were just examples.

Please show us your current line of code for the image. Perhaps you could include the output in the lower part of the column where you write the code?

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