Basic HTML: Add Images to Your Website

Please can anyone tell me what is wrong with below code

<img src="https://s3.amazonaws.com/freecodecamp/relaxing-cat.jpg" alt="Relaxing Cat"> 

I’m getting following comment

Your image should have a src attribute that points to the kitten image

Welcome, Ahmed.

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

For future posts, if you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

We cannot help much more, without seeing all of your code, as it is written in the code editor.

Thank you.

Hi,
could you add the curriculum link ? it will be easier for us to understand your question.

Thank you very much for the guidance. Appreciated.
Below is my complete code;

<h2>CatPhotoApp</h2>

<main>

<img src="https://s3.amazonaws.com/freecodecamp/relaxing-cat.jpg"            alt="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>

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


Here are the instructions:

Now set the src attribute so that it points to this url:
https://bit.ly/fcc-relaxing-cat

This is what you have:

<img src="https://s3.amazonaws.com/freecodecamp/relaxing-cat.jpg"            alt="Relaxing Cat">

Can you see the difference?

Thanks. Yes . I worked. Thanks a lot for prompt help.

<img src="[https://bit.ly/fcc-relaxing-cat](https://bit.ly/fcc-relaxing-cat)" alt="Author standing on a beach with two thumbs up">

Hope this helps.

Your code has been blurred out to avoid spoiling a solution for other campers who may not yet want to see a solution. In the future, if you post a full passing solution to a challenge and have questions about it, please surround it with [spoiler] and [/spoiler] tags on the line above and below your solution code.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting working solutions.

Thank you.

1 Like

Ok thanks for telling me