Learn HTML by Building a Cat Photo App - Step 8

Tell us what’s happening:
Describe your issue in detail here. I do not understand what is missing
I copied it from the example

Your code so far

<html>
  <body>
    <h1>CatPhotoApp</h1>
    <main>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>Click here to view more cat photos.</p>
      <imgsrc="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg">
    </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/104.0.5112.81 Safari/537.36 Edg/104.0.1293.54

Challenge: Learn HTML by Building a Cat Photo App - Step 8

Link to the challenge:

When you copy from the example, make sure you pay attention to how things are spaced out.

<img should be followed by a space

Tell us what’s happening:
Describe your issue in detail here.
Not sure if i have the img or/and the src in the correct
part of the program This below is the error message
that i receive

Hint

Your img element should have an src attribute. You have either omitted the attribute or have a typo. Make sure there is a space between the element name and the attribute name.
Your code so far

<html>
  <body>
    <h1>CatPhotoApp</h1>
    <main>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>Click here to view more cat photos.</p>
      <imgsrc="https://cdn.freecodecamp.org/curriculum/cat-photo-
      app/relaxing-cat.jpg"
    </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/104.0.5112.81 Safari/537.36 Edg/104.0.1293.54

Challenge: Learn HTML by Building a Cat Photo App - Step 8

Link to the challenge:

You’ve created a new element called imgsrc :slight_smile: There needs to be a space between the element name and the attribute name. Also, it looks like you accidentally deleted the closing > on the img tag.

Tell us what’s happening:
Describe your issue in detail here.
I entered a space between img and src
which does not show here and
entered a closing on the img tag
which does show, However, I still
come up with the same error message.
Not sure why.
I have the first part of the code as
scr="
Your code so far

<html>
  <body>
    <h1>CatPhotoApp</h1>
    <main>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>Click here to view more cat photos.</p>
 
      <img> src="https://cdn.freecodecamp.org/curriculum/cat-photo-
      app/relaxing-cat.jpg"
    </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/104.0.5112.81 Safari/537.36 Edg/104.0.1293.54

Challenge: Learn HTML by Building a Cat Photo App - Step 8

Link to the challenge:

Your effort is still not yielding correct code but hopefully when you compare the code you wrote against the sample given in the exercise you can see why.
Let me help you do that by putting your code and the sample below each other for easy comparison:

Let’s start with sample code on top line, and your code directly below
<img src="https://www.example.com/the-image.jpg">
<img> src="https://cdn.freecodecamp.org/curriculum/cat-photo- app/relaxing-cat.jpg"

If you like playing the game ‘spot the difference’, this one should be easier than that game.
Do you see the differences?

Where are the brackets located? (these things matter, they should be at the start and end only)

The URL should be all together, not split up on different lines.

As fyi, the word ‘src’ is an HTML attribute. Remember that phrase.
HTML attributes always get declared inside the opening tag of the respective HTML element. (right now your src is an orphan — it needs to go inside the opening tag of img)

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