Src alt explanation please

hi im just wondering how and what is src and alt if any one could help please Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

<h2>CatPhotoApp</h2>
<img src="https://bit.ly/fcc-relaxing-cat"5.0k"alt=fcc-relaxing-cat/>
<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>
<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; CrOS x86_64 12239.92.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.136 Safari/537.36

Challenge: Add Images to Your Website

Link to the challenge:

Hi @Alexmorris1971

I hope you are doing great. The img tag is used to embed images into HTML document. The value of the src attribute is the path to the image you want to embed in the HTML document and each img tag should have the src attribute.

The alt attribute is the alternative text that the browser displays if the image fails to load for some reason. It is also used by assistive technologies such as screen readers. Its value should describe the image. Therefore, you should always have alt attribute in an img tag though it is not mandatory. You can also set its value to an empty string if the image is a descriptive image.

For more about the img tag, you can read the MDN docs.

1 Like

if i understand right,the problem is with aditional double quote after the cat. it messes up the source link.
try to delete it.

1 Like

Thanks I’m still abit stuck but thanks for your help

What are you stuck on? Regarding this particular challenge, @galustyan.andrew has given you a hint and make sure to follow the instructions given. Check the code below.

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

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