Can’t Populate the “alt” attribute

Everything seems to work, except the “alt=“ attribute is coming back as empty. When I disable the “src=“ the image is lost and my description “relaxing-cat” appears, which is what I thought the “alt=“ attribute is supposed to do? So I guess I’m not sure why the test comes back saying the alt attribute is empty? As an aside, when I remove the hyphen between “relaxing” and “cat”, only the “relaxing” portion of the text displays. I’m not sure why that is.

Your code so far



<h2>CatPhotoApp</h2>
<main>
<img 
src=https://bit.ly/fcc-relaxing-cat alt=relaxing-cat>
<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 (iPad; CPU OS 12_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.2 Mobile/15E148 Safari/604.1.

Challenge: Add Images to Your Website

Link to the challenge:

HI @RobE!

Welcome to the forum!

Your alt and src attributes need quotes.

FCC example:

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

Revisit the lesson paying close attention to how attributes are set.

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

and you input;
<img src=https://bit.ly/fcc-relaxing-cat alt=relaxing-cat>

Notice any missing punctuation?

Hi @jwilkins.oboe
Thanks for the fast reply, I really appreciate it! I had tried putting quotations in, but that seems to have no effect. When I put quotations in for the “scr=“ attribute, I lose the image as well?

Hi Roma, thanks for the reply. I definitely tried copying the indicated punctuation verbatim (using the source for the actual exercise). When I use the “description.” format shown earlier in the lesson, the “alt” attribute still comes back as missing, but the src” attribute also comes back as missing and I lose the cat image . I took out the quotations in my code because, it resulted in the image showing. I tried multiple ways of incorporating the quotations, but I was less successful (nothing worked when they were included?)

Hi @Roma, I really appreciate your reply! I responded to your reply, but wasn’t familiar with the “@“ function. Also the “description” that has a box around it in my reply was actually supposed to be “<img” . Not sure why that was substituted? Anyway, thanks again for the reply!

Hi @jwilkins.oboe @Roma,
Please disregard my last. I was messing around with my code for 2 hours last night. This morning I decided to set my ipad down and try my code using a laptop. It worked right away. I’m not sure why things are not running correctly when using an ipad, but I’ll stick to the laptop from now on. Thanks for your help!

It’s the quotes on the iPad @RobE. You can turn off smart punctuation.

Sorry I missed that you were on an iPad. It was late and I glossed over it.