Uploading image alt will not work

Tell us what’s happening:
I can’t work out why my alt is showing red, what am I doing wrong?

Your code so far


<h2>CatPhotoApp</h2>
<main>
<imgsrc='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 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1.

Challenge: Add Images to Your Website

Link to the challenge:

1 Like

Hello @shannon.maybeth. Your img tag is not correct and has some typos in it.

Notice that imgsrc is together. Add a space after img. Also, your img tag doesn’t have an > at the end. Add it also.

Happy Non-Stuck Coding!

2 Likes

Thank you so much for this, I have now added this and it is no longer red but when I’ve ran the test it still says …

Your image should have a

src

attribute that points to the kitten image. Your image element’s

alt

attribute should not be empty. // tests completed

I’m new to this and so confused, hope you can help. Sorry for all the questions

1 Like

Can you please share your current code?
When posting your code, do as the following:


Video credit: FCC Moderators

1 Like
<img> src=‘http://bit.ly/fcc-relaxing-cat’ alt=‘relaxing cat’

Hey @shannon.maybeth.

  • I think you did not understand my answer. You need to add > symbol at the end of the img element. That means, you need to add > after the value of alt and not after img.
  • Also, use double quotes instead of single quotes.
  • The source url of the cat photo starts with https and not http.

Fix these issues.

1 Like

the altributes like src and alt should always inside the declaration of an element like this <img scr="url" alt="some text">

2 Likes

<img> src=‘http://bit.ly/fcc-relaxing-cat’ alt=‘relaxing cat’>

Like this? If so I tried this still no luck! 

So confused as thought this would be right! Really Appreciate all your help thank you

1 Like

Hey @shannon.maybeth. See my updated post 6.

1 Like

Thanks soo much! I have now completed it! Sorry for the confusion

1 Like

It’s ok. I am always happy to help.
Happy Non-Stuck Coding!