Adding an image to html app


I just noticed others have had the same issue but I can’t seem to find any replies or answers to their issue so I will ask my own. I have done everything that is required to add this image but the editor of this program says I have failed to src the image. I don’t understand and have tried to figure it own on my own and can’t figure it out. I have uploaded the screenshot of my code. Can someone please help me !

Hi there. When I input your code as is into the Add Images to Your Website challenge it goes through immediately. All I know to suggest is to try refreshing your browser. Chrome works best for these challenges, I believe, so if you are using a different browser you may want to switch. Hope this helps.

1 Like

I just checked my notes,
Try this:
<img src =“https://www. And the rest of the URL
Update:
See later comment, there is a forward slash at the end of the code. Remove / and it will be ok

Hello there,

It is difficult to tell with a screenshot of code, but here are some things that it could be:

  1. It looks as though the img element is split over multiple lines. It should all be on one line
  2. Browser extensions can interfere with the tests. It is recommended to disable all browser extensions, when working on the curriculum. (e.g. ad-blockers are unnecessary as freeCodeCamp is ad-free, but they can block the javascript used to run the tests)

For future posts, if you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Hope this helps

Thank you for your response it helps a lot. I also want to let you know that I agree it should all be in one line but the way this format seems to be done it puts into 2 lines I have no choice while I’m doing these lessons it drives me insane and I may not last because of it.

What do you mean by this? Are you coding on a mobile device?

No, my laptop but the code editor doesn’t give too much room unless there is a way to make it bigger but I don’t think so because the instructions are on one side and the output or what appears on the screen is on the other.

Right, but what happens is this:

  • If one line is too long, then it is wrapped around “onto another line”. However, it is still counted as being on one line within the script file (as indicated by the line numbers:

Can you see the difference. If I want the second sentence to only take up one line in the text file, then I need to delete the return, and it will wrap to look like:
image

Hope this clarifies

Found it! You have a forward slash / at the end of your code.
Remove that, and all will be ok

1 Like

ok, your suggestions make sense. I am a brand new learner and I don’t know much about coding. I have just made the decision I need to learn more about computer navigating before I jump into learning to code. Thank you for your help in making this decision. It makes complete sense now why I am having so many issues learning when I have just barely began.

1 Like

Don’t loose heart, soon enough you will be laughing at the mistakes you made as a beginner, I started freecodecamp last year and I was terrified of all the brackets and errors until I realised that some of the most talented people with loads of experience consider it normal to struggle with any coding project(read up on the FCC article on freeCodeCamps’s facebook page, the articles really helped me understand what coding is really about. :slight_smile: you will be a coding master soon enough :smiley:

Thank you for your response. I have decided that I need to learn more about computer navigating before I jump into coding. I am having so many issues because I don’t know how to use certain tools or functions. I was hoping I wouldn’t need to take a Microsoft office class but maybe I do.

what do you mea by computer navigating? (out of interest)

Thank you for your encouragement & advice. It’s good to know I’m not alone. I will read up on what you suggested.

I mean like learning the basic fundamentals of computers. I took a computer class 10 years ago that involved some Microsoft office skills including excel and powerpoint it taught me a lot but I have forgotten a lot as well. I think if I have lost my basic understanding of what a computer does or my literacy in operating one.

1 Like

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