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>
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.