It keeps saying alt shoudnt be empty

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**
<h2>CatPhotoApp</h2>
<main>
<img src=https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg alt= A cute orange cat lying on its back>

<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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36

Challenge: Add Images to Your Website

Link to the challenge:

With attributes, you need to put quotes around any value that has spaces in it. But I would recommend you also put quotes around values that don’t have spaces, such as the href URL.

i have done that but still doesnt work. do u mean to put ‘’ these before and after the URL and the alt?

Yes, the syntax for adding an attribute is:

name="value"

i did that and still wont work

You’ll need to show us what you did by pasting your HTML in here. To display your code in here you need to wrap it in triple back ticks. On a line by itself type three back ticks. Then on the first line below the three back ticks paste in your code. Then below your code on a new line type three more back ticks. The back tick on my keyboard is in the upper left just above the Tab key and below the Esc key.

<img src=https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg alt=''A cute orange cat lying on its back''>

and there is qoutes on the url

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

This your alt value, start with the first quote and end with the second

isnt that what i did? or do i not use ‘’>‘’ at the end either?

You can’t have two quote characters at the start
If you want double quotes you need to use the double quote character, "

so i had to do only 1 ’ on each side?

it worked! thank u so much

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.