Add Images to Your Website - Please help!

Add Images to Your Website - Please help!
0

#1

Hello humans, I’m having trouble figuring out how to add images to my html code. I am brand new to html and freecodecamp, and I don’t understand <alt>s or <src>s

Your code so far


<img><src>https://bit.ly/fcc-relaxing-cat<alt>"Oopsie poopsie"</alt>
<h2>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: Not here, sorry. =)

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


#2

src is an attribute of image not a separate tag


#3

src is an attribute of image

<img src="...">

so is alt for that matter


#4

Hey, the descriptions on the left side of the challenge page are usually somewhat detailed and teach you the concept.

<img src="https://www.your-image-source.com/your-image.jpg" alt="Author standing on a beach with two thumbs up.">

This is an example that you can follow.

<img> element is self-closing, it means that you don’t need to close it yourself. It usually also means that you put all your code inside between the < and > arrows which represent beginning and end of the tag.

src and alt are attributes that are to placed inside the img tag. Src stands for source and that’s where you put the link to your image. Alt stands for alternative and it’s the text that displays in case the image doesn’t load, the alt attribute is not required but very recommended.

I hope this clears things up, you follow the examples in the challenge description to learn the correct syntax.


#5

Thanks so much! You made my day by helping me! :grinning:


#6

Sorry I am late in the response, but I wanted to thank you as well! You made my day after that!