I'm Stuck on the kitty photo. the alt attribute part

how do I fill the alt attribute?
There isn’t enough description in the task to explain the alt part.

can you please help

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg"
"<alt>Fcc Cute kitty"</alt>

<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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36

Challenge: Add Images to Your Website

Link to the challenge:

1 Like

Look at you quotations again.

Edit: also you didn’t close your img

In HTML, words that are surrounded by < and > are called elements. The first word inside of those code brackets is the actual element name, which tells the browser how it should behave. Any extra words inside of those brackets are called attributes.

To define an attribute of an element you would write something like this:
<element attribute='attribute value'>

The objective of your task with this lesson is to assign an alt attribute to your <img> element with a value that describes the photo.

Hope this helps clarify. Feel free to respond for more information.

4 Likes

This is not a valid alt attribute.

Going back to the example provided:

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

The alt attribute is part of the img tag, not a separate tag.

that was a great help. Thank you, Jeremy.

now I’m facing another issue.

It’s telling me that I should have an src that points to the kitten picture.
I’ve read the example in the HTML attribute explanation page, but I don’t see any difference between what I have vs what is on that page.

Can you post your new code so we can see what is going on?
Thanks! :grinning:

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

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

This is what I’m working with atm.

sorry, I’m very new to this, and still trying to familiarize myself with everything.

You are using a different src url here

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

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