Learn HTML by Building a Cat Photo App - Step 8

Tell us what’s happening:

I’m struggling with my src attribute, the error is telling me I either omitted the URL or have a typo.

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>Everyone loves cute cats online!</p>

<!-- User Editable Region -->

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

<!-- User Editable Region -->

    </main>
  </body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

Challenge Information:

Learn HTML by Building a Cat Photo App - Step 8

Hi. I think you are missing your closing tag from the img element.

Welcome to the forum @Jadefire

As @a1legalfreelance suggested you need to include a closing angular bracket for the image element.

Also, replace the white space after the src attribute equals sign with a double quote mark.

Happy coding

I’ve tried and I’m still getting the same error.
I still don’t get it.

Your attribute is outside the tag, and its content is outside the quotation marks.

What you have in your screenshot:

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

What you should have:

Mod Edit SOLUTION REMOVED

Let me know if that works.

I got past the 8th step, thanks!

1 Like

Great. Feel free to ask if you get stuck on anything else, and happy coding!

I’ve got a problem with step 9

You’re missing the alt attribute, which gives a description of the image for people using screen readers and displays when the image doesn’t load. You just need to add it into your img tag after the src attribute.

What you have:

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

What you should have:

Mod Edit SOLUTION REMOVED

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