Help please I’m stuck

Tell us what’s happening:

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>
<img src="https://bit.ly/fcc-relaxing-cat"/>
<alt="A business cat wearing a necktie">
<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 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Mobile/15E148 Safari/604.1.

Challenge: Add Images to Your Website

Link to the challenge:

1 Like

The alt attribute is a part of the img tag so you should have it inside of the img tag

<img src="" alt="">

1 Like

all is correct buddy…
just pass the code and it will run.

You do not add a separate alt element. It is an attribute passed on to the img element if anything goes wrong and the image cannot be displayed. So you have to add it after your src attribute and the link.

1 Like

No, it is not correct take a look at the code and run it you will see an error

1 Like

check this code and apply it in your code editor.

<h2>CatPhotoApp</h2>

<main>

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

> img alt="A business cat wearing a necktie.">

**

  <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>
1 Like

I tried, it says
image

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

2 Likes

write this in your alt equals to given task.

Where is the img tag’s src attribute

1 Like

here u can find.
check, if not reply me

your code fails the tests. If you need help yourself please open your own topic, this one was to help @Justlearning

3 Likes

I tried that too but it keeps saying my alt attribute is empty

Tried it but didn’t work either.

None of the suggestions worked. I feel like giving up :slightly_frowning_face:

1 Like

Did you write any text inside it?

The alt attribute should be in the img opening tag and not on it own,

You don’t need to give up

<img src="https://bit.ly/fcc-relaxing-cat" alt="A business cat wearing a necktie">

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

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 full working solutions.

1 Like

what’s your code now?

1 Like