How do i add an alt text

How do i add an alt text
0

#1

Tell us what’s happening:

Your code so far


<img src="https://bit.ly/fcc-relaxing-cat"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: Mozilla/5.0 (X11; CrOS x86_64 10323.67.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.209 Safari/537.36.

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


#2

Here you have lost the opening character of your h2> tag. It should be <h2>
Remember to close the <img /> tag, it is a self closing one so does not need the full <img></img>

You should have your image above the <h2> like:

<img src="https://bit.ly/fcc-relaxing-cat" />
<h2>CatPhotoApp</h2>

Now you can add the alt="example alt text" as an attribute into your img tag


#3

Hey @mathieu01,
Alt is an attribute which contains the text which will be displayed when you hover over the image.
It is helpful when your image is not getting displayed for some reason.
Now think of how you add an attribute and try solving the challenge.
Hope it helps.


#4

I have was just confuse where i should put the alt text, but i got it