This is about inserting an image test. I'm not understanding where i'm going wrong writing the code and how to place my alt

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>


<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/100.0.4896.88 Safari/537.36

Challenge: Add Images to Your Website

Link to the challenge:

what have you tried? the code you shared is the starting code

I tried placing the image in the 3rd line under the main, I’m not understanding what is meant setting the src attributes so that they point to the url.

Please share the actual code you tried. Thanks

You place your the image tag within the main tag, for example,

<main>
<img src='Image Link', alt ='Alt Text'>
<p>Paragraph 1</p>
<p>Paragraph 2</p>
</main>
1 Like
<img src="[https://www.freecatphotoapp.com/your-image.jpg](https://www.freecatphotoapp.com/your-image.jpg)" alt="A business cat wearing a necktie.">
I placed this under this in the 3rd line.
1 Like

Two problems

  1. this is not how you set the src

  2. this is not the url the instructions want you to use

I’m not sure why you have braces [] and parenthesis (), but I’d double check the example because neither of these are in the example

<h2>catphotoapp</h2>
<main>
<img src="[http://www.freecatphotoapp.com/your-image.jpg](http://www.freecatphotoapp.com/your-image.jpg)

<p>text</p>
<p>text</p>
</main>

This is how i wrote the code.

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

I’m not sure if you saw this reply, but you still have these two problems.

This code seems less correct, but it appears that you are writing some sample that is sort of like your code instead of real code here.

Hi @twillits !

Welcome to the forum!

I would suggest resetting the lesson.

Reread this line of the directions more carefully because you are still using the incorrect url.

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

Also, take a look at the proper syntax again, because you are still using [] and () but that is incorrect.

Hope that helps!

2 Likes

What does it mean for the src attribute to point to the image?

Like the example:

You can add images to your website by using the img element, and point to a specific image’s URL using the src attribute.

An example of this would be:

<img src="https://www.freecatphotoapp.com/your-image.jpg">

Jeremy for some reason this lesson has become extremely confusing for some reason. Please help!

What does your new code look like?
Please paste it here in the forum so people can help you.

<h2>CatPhotoApp</h2>
<main>
<img src="[http://cdn.freecodecamp.org/curriculm/cat-photo-app/relaxing-cat.jpg](http://cdn.freecodecamp.org/curriculm/cat-photo-app/relaxing-cat.jpg)" 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>

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

Your image tag is not correctly implemented, try

<img src="https://theimageurl" alt="A cat photo">

You do not use parenthesis or curly braces on images( possibly all html tags don’t use them).

If you don’t understand part of what we say, you can ask follow up questions. You haven’t removed the () or [] yet.

1 Like

I think you are confusing HTML with the forum markdown format (which is how you would post an image in the forum)

in HTML

src

means source

source is what?

In HTML

src=

means “the source is”

So give it the source for the image in the format that HTML expects.

The lesson gives you the link to the image in the correct and proper format.

Read the lesson more carefully.