Problem with website images

Tell us what’s happening:
Please someone should provide me answer to this piece of shit ‘‘Your image should have a src attribute that points to the kitten image’’ ?. i have spent have spent 6hours on this challenge . draining all my energy.

Your code so far




<h2> <img

src='https://www.bit.ly/fcc-relaxing-cat.'alt="kitten image."> 
 CatPhotoApp</h2>
<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 (Linux; Android 7.0; S8_Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Mobile Safari/537.36.

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

You have probably already tried this one, but I was noticing a missing file extension to the browser image src. I would also put a space after the single quotes for the source, but that is just me. Also, does it ask for the image size? Any who. I could be way off from what you are attempting to perform. If so, I apologize. I have been coding for just 5 years in my spare time, but I am new to this forum…:slight_smile:

  1. Directions say
Insert an img tag, before the h2 element.
  1. You have a period at the end of your src. I did not test removing it but it is probably the problem.

It doesn’t ask for the image size

I see a couple of problems.

  • Your img tag is inside of the h2, it should probably be outside the h2, seems weird to put an img inside a h2, but thats not whats making the test fail.
  • You’ve added an ‘www.’ and a ‘.’ to the url. https://www.bit.ly/fcc-relaxing-cat. should be https://bit.ly/fcc-relaxing-cat Once you fix this up it should pass.

You should copy and paste links to avoid typos.

1 Like

tried that but it still didnt work

Are you sure? I copy and pasted exactly what you have, the only change I needed to make for it to pass was fixing the link. Can you show the new code you tried?

Now you need to wrap the link in quotation marks and you’ve closed your image tag early.

<img> src=https://bit.ly/fcc-relaxing-catalt="kitten image.">
should be
<img src="https://bit.ly/fcc-relaxing-cat" alt="kitten image.">
1 Like

it worked now. thank u very much.

1 Like

It looks to me like you got er done. I was just going to suggest the same thing! Keep on keepin on!