HTML CSS add images to your website

Tell us what’s happening:
I am having issues with passing the
Add images to my website the second test precisely I passed the first and third one

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>
<img src="https://cdn
.freecodecamp.org/curriculum/cat-photo
-app/relaxing-cat.jpg"
alt="A cat wearing a tie">

<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 (Linux; Android 10; TECNO BC2c) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.73 Mobile Safari/537.36

Challenge: Add Images to Your Website

Link to the challenge:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more information you give us, the more likely we are to be able to help.


You have a bunch a extra line breaks in here that are breaking your code. Put everything on one line.

Bro I am having issues with passing this second test which is “Your image should have a src attribute that points to the kitten image” but I passed the rest what could be the issue thanks

GO AHEAD AND CUT OUT AND RE-PASTE THE ADDRESS :

WHAT THE CODE LOOKS LIKE:

https://cdn

.freecodecamp.org/curriculum/cat-photo

-app/relaxing-cat.jpg

WHAT THECODE SHOULD LOOK LIKE:


https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg

Html is sensitive to line breaks.

Did you try removing the line breaks?

Yes I did bro I just made a recent post on the same problem it still negative

You should probably go ahead a post your most recent Code.

Tell us what’s happening:
I passed the first and last test only and problem now is this
“Your image should have a src that points to the kitten image”

Your code so far


<h2>CatPhotoApp</h2>
<main>
<img src="https://cdn
.freecodecamp.org/curriculum/cat-photo
-app/relaxing-cat.jpg"alt="A cat wearing a tie">

<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 (Linux; Android 10; TECNO BC2c) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.73 Mobile Safari/537.36

Challenge: Add Images to Your Website

Link to the challenge:

You still have all of these line breaks in your code. Everything should be on one line, not three.

FIRST: This is the URL:

https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg

Could it be a mobile related issue, with the lineBreaks…

I wouldn’t quite call this a mobile issue’.

Small screens will show line wrapping, but you should not hit the enter or return key at any point while typing out the img element.

Thanks guys it worked after I copied and pasted it I was writing it out initially :slightly_smiling_face:

2 Likes

Awesome. Good work getting it to work!

1 Like

I wonder why that happened though, when being written out…

Mod Edit: Solution Redacted

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.

@JeremyLT I have 4 or 5 more pages containing solutions sets, if you want them.
I’ve been collecting them.

If you have any problems in the future, with the quotes on your phone, if you haven’t tried this fix… Go ahead and try it.

How to Type Straight Quotation Marks on iPad & iPhone:

Or if you ever use a MAC


ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ

Thanks bro :slightly_smiling_face:
I am currently having issues with my tribute page project I have tried adding the test suit on my code pen but it isn’t working will send a screenshot now bro :slightly_smiling_face: