My code is note working and it's frustrating. What is the correct code

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

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>
<img scr="https://bit.ly/fcc-relaxing-cat 4.7k"alt="fcc relaxing cat."



<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 9; SM-G965U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Mobile Safari/537.36

Challenge: Add Images to Your Website

Link to the challenge:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more information you give us, the more likely we are to be able to help.

<img scr="https://bit.ly/fcc-relaxing-cat 4.7k"alt= "fcc relaxing cat"
This is my code I put in and it’s not working. It’s telling me that the scr needs to point to the image. My question is my code correct and if not what’s the correct code

This isn’t the right src though:

Now set the src attribute so that it points to the url https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg

Also, you didn’t close your img tag with a >.

Is it the scr pointing to the image?

I don’t understand what you are asking.

You used the src of "https://bit.ly/fcc-relaxing-cat 4.7k"

You need to use the src of "https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg"

I mean is it the scr pointing to the url

This is how my code looks

<img scr="https://cdn.freecodecamp.org/curricul 
    um/cat-photo-app/relaxing-cat.jpg">

Is this correct

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 (’).

You shouldn’t have this extra line break in there. Your code should be all on one line. Also, you need to put the alt back.

I’m not clear on what you’re saying. Are you able to show me

Your code is on two lines:
image

It must be all on one line.


Also, you removed your alt attribute, but you need it.

1 Like

It won’t fit into the one line??? Is there a phone number to call?

No, there is not a ‘phone number to call’?

It is ok if your code wraps onto multiple line, but you hit ‘enter’ or ‘return’ in the middle of the url, which breaks the code. You can’t hit ‘enter’ or ‘return’ while typing the url.

<img scr="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg"> Alt="A business cat is wearing a neck.">

Is this correct

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 (’).

HI @Lizdnn09 !

You keep misspelling src.

This is wrong

2 Likes

You are close. You have two closing >, but you should only have one. Also, alt should have a lowercase a.

Also, alt needs to be all lowercase.

This is incorrect.

Hope that helps!

1 Like
<img src="https:www. freecatphotoapp.com/your-image.jpg"> alt="A business cat wearing a necktie">

This is how it’s suppose to look