Keeps saying alt is empty ,why?

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

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>
<img src=https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg  




<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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36

Challenge: Add Images to Your Website

Link to the challenge:

There are several things you need to look at.

  1. you never close your img tag

  2. You do not even have an alt attribute in your img. The directions say “ Your image element’s alt attribute should not be empty.”

Look at the directions carefully, and see how they add an alt with their img

My bad, what I mean is I’ve actually succeeded to the point, where the alt is working and the writing is showing up but it wont pass me, the code you are seeing is without thee alt. I have gotten as far as seeing writing on the side of the photo, but it says the alt is empty after I run it I’m going to post it once I have done thee alt, bear with me kind friend. Oh also thanks for taking time to respond that means a lot to me.

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

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>
<img src=https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg alt= Kitty need a blunt   




<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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36

Challenge: Add Images to Your Website

Link to the challenge:

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

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>
<img src=https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg> alt= Kitty need a blunt   




<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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36

Challenge: Add Images to Your Website

Link to the challenge:

I have merged all of your duplicate posts into this thread.

As for your code, you are missing quotes and a > at the end of your img tag here

This is the correct structure for an image tag

<img src="url goes here" alt="descriptive text goes here">

Make sure to follow that structure and the test will pass.

Hope that helps!

Ohhhhhh thanks @jwilkins.oboe boom bout to give it a try

1 Like

@jwilkins.oboe :+1:t6::grin::ok_hand:t6:thank you. I’m probably gonna be needing your wisdom could you mentor me through this process? please and thank you in advance.

Glad you were able to figure it out.

The forum is the best place to get help throughout this whole process.
There are plenty of knowledgeable people that can help you :grinning:

Whenever, you get stuck just reach out on the forum and we are happy to help. :grinning:

1 Like

Roger that, thanks again.:muscle:t6::pray:t6:grateful

You will need to close that img tag and also add an alt as so: alt=“my picture” so as JavaScript can render something when the image it’s found

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