I am stuck with how to create src attribute that points to kitten image? I need help!

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

  **Your code so far**

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

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

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0

Challenge: Add Images to Your Website

Link to the challenge:

Part of being a good developer is reading things closely and paying attention to details.

Reread the instructions. That is the url from the sample, not the one you were told to use.

Okay thanks, let me reread it.

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

I have tried all method i could think of, sir, it is passing. And i am very new to this. Can you help me understand better?

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

Reread this line closely:

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

Note the url it is telling you to use. Compare it to the url you are using.

If you are unsure of something, please ask but please be specific.

[quote=“kevinSmith, post:6, topic:498969”]
src
[/qu

<img src=" then the URL and /> still can’t get it done. what exactly am i missing i have read and reread the line over and over i am still stuck.

Show us the code that you are currently trying.

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

Your image element’s alt attribute should not be empty.

I am stuck with this for long hours now

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

The instructions say:

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

Is that the url you are using?

Part of being a developer is close attention to detail.

Yes, it is the url i am using,

I am dealing with “Your image element 's alt attribute should not be empty” i can’t fix this to proceed to the next stage. what should i do here i have try several codes it isn’t working.

Using the code that you posted:

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

That test passes for me:

The only one that is failing is the one for url.

This is the url you are supposed use:

https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg

This is what you are using:

https://www.freecatphotoapp.com/your-image.jpg

When I fix that, your code passes for me:

<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg"/>

Still not working sir, i have removed the one you noted. just ALT attribute is not passing

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

Please format your code correctly.

This is different code. The code you posted before had the wrong url but it had an alt attribute. You’ve fixed the url but removed the alt attribute.

It needs an alt attribute.

Here is the example:

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

I’ve spaced it out for readability, but html and the test don’t care about that - it doesn’t matter.

Here’s what you just shared:

<img
  src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg"
/>

Do you see an alt attribute in there?

Here’s what you posted before that:

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

So, you had an alt attribute before, but removed it.

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