Src and alt issues

Tell us what’s happening:
There seems to be a glitch. I’m getting an error when trying to use the src. " Your image should have a src attribute that points to the kitten image.

The following message has a check mark - your image element’s alt should not be empty. So the issues isn’t with the alt, but with the src

Your code so far


<h2>CatPhotoApp</h2>
<main>
<img src="https://bit.ly/fcc- relaxing-cat." 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 (X11; CrOS x86_64 12871.76.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.103 Safari/537.36.

Challenge: Add Images to Your Website

Link to the challenge:

You need to add ``` on the line before and after your code for us to be able to see it.

Right, your url is not correct. Your url must be exactly and only https://bit.ly/fcc-relaxing-cat
You have an extra space and an extra ‘.’

Still says there is an issue with src

  • Your page should have an image element
    x Your image should have a src attribute that points to the kitten image
  • Your image element’s alt should not be empty

The image of the cat appears, but the alt text does not

What is your updated code?

The site isn’t allowing me to posts the url, so here it is line by line. Ignore spaces aside from those between img and src and " and alt

img src=“https: //biz.ly.fcc-relaxing-cat”
alt=“fcc-relaxing-cat.”>

I need to see your entire code. You can post it by adding the characters ``` on the lines before and after your code.

But it looks like the url does not match the one I copied from the description.

https://biz.ly.fcc-relaxing-cat

is not

https://bit.ly/fcc-relaxing-cat

img src="https://biz.1y.fcc-relaxing-cat" alt="fcc=relaxing-cat.">

I’ve tried with both biz.1y/fcc and biz.1y.fcc

I’ve been copying the url the whole time

Why don’t you copy and paste? You are using a 1 when you should be using a l. Copy and paste is your friend.

img src="https://bit.ly/fcc-relaxing-cat" alt="fcc-relaxing-cat.">

I’ve been using copy/paste during the exercises.
I see a lot of people are having trouble with this part.

If you are adding that exact url into a correctly formatted sample img tag, then your code will pass. The last url you pasted works for me.

In the latest partial code you’ve provided, it looks like you are missing an < at the start of your tag.

Lots of people have trouble with this part because it’s very common for people to have a typo in the url.

That was in oversight on this chat. The tag is there and has always been there.
I’m positive this is correct, but for some reason is not being accepted.

I just checked again and it still in not going through, saying image should have src to kitten image

It’s almost certainly not correct in some way.

What is your current full code?

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

URL was copy and pasted.

What is your current full code. I would like to see absolutely everything in the editor from <h2> all the way to </main>.

CatPhotoApp

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

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

You’ll need to put ``` on the line before and the line after your code for it to be visible. If you don’t, the forum tries to render your code.

<h2>CatPhotoApp</h2>

```<main>```

<img src="https://bit.ly/fcc- relaxing-cat" 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>```

Close.

You want

```
Your code here
```

Anyways, you have another typo in your url.

You have

"https://bit.ly/fcc- relaxing-cat"

You need

"https://bit.ly/fcc-relaxing-cat"

That was it.
Couldn’t tell from the line break.

I’m good.

Thanks for your time, Jeremy.

1 Like