Image not showing in JS HTML Code

So I learned the format for an image in HTML code, and as far as I know, I did everything correctly. But when I press “Run” on my Codecademy workspace, a box with a question mark inside pops up. What am I doing wrong? Here is my code that I am using.

<img src= "/Sunshine Sail Aways.jpg" >

Please help!

Stick a dot in front of the slash so it points to the current directory.

Consider the effect of white space in URLs. They need to be encoded. And, capitalization can make for potential and avoidable errors.


Still does not work.

do we replace spaces with %20 in the url in this case?

Um, not sure I’d go to that length. Better to adopt a naming convention that does not require encoding. It’s a simple thing, just don’ t create names with spaces. The capitals is another thing, but whatever. Use dashes or underscores for spaces and remove the encoding burden from the picture. It is all clock ticks or needless hard coding. All preventable.

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