How to add src attribute . I add but it says add src attribute

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

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>       
<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 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.85 Safari/537.36

Challenge: Add Images to Your Website

Link to the challenge:

Add an image element and the src attribute inside it. And the src should be the link to your image.

add an img src attribute like this

<img src="https://www.freecatphotoapp.com" alt="freeCodeCamp">

syntax for adding image is


<img src="source of your image" title="title of your image" alt="alternative text if image not shown showhow">

example :
loptop

<img src="https://images.unsplash.com/photo-1593642632559-0c6d3fc62b89?ixlib=rb-1.2.1&ixid=MnwxMjA3fDF8MHxlZGl0b3JpYWwtZmVlZHwxfHx8ZW58MHx8fHw%3D&auto=format&fit=crop&w=500&q=60" alt="loptop" title="loptop">

this is the above image code .
you can also use height , width if you want .
this is just demo i recommend you to learn by yourself.
the lesson is available on freecodecamp for img tag

other resorce
you can read this HTML Images

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

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>
<img src="https://www.freecatphotoapp.com/your-image.jpg" alt="A buisness 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 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.85 Safari/537.36

Challenge: Add Images to Your Website

Link to the challenge:
https://www.freecodecamp.org/learn/responsive-web-design/basic-html-and-html5/add-images-to-your-websitey

You are missing the closing part for the src. Add > after the necktie.” text

You also need to add the correct src link that they give you. Look again at the instructions, your src link is different then what they provide

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

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