+ 1
Why when i put a img tag on the browser i see a x and not the image?
9 odpowiedzi
+ 7
if it's on ur pc you would put
<img src="file:///C:/......." alt="" />
complete the directory for the image
if it's a relative path and u have a folder named "HTML Project" (or whatever) and u have two folders, one html where ur html files r, and one images where the images are, you can simply put
<img src="../Images/myImage.jpg" alt="" />
../ goes up one directory (folder level)
+ 2
Wrong path. It cannot find the image. Check your image path and correct its reference in the src attribute of your image.
+ 2
<img> with 'src' set to a relative urls cannot be render on Sololearn code playground, as source is hosted on Sololearn servers, so relative urls are supposed to be relative to the server, not to your PC: local images can only be displayed if you save and run your html source locally ^^
Even with absolute url and 'file' protocol, your source need to be local, as else the filesystem isn't allowed to scripts (for security: else any JS script could read your files without your permission :P)...
Best and pretty only way to include images in Html pages, is to host them anywhere on web (there are plenty of images/files hosters, even free of charge).
+ 1
Dronix, it depends where your images are located in relation to the page that's calling the code. So for example, if it's in an images folder, you may have: src="Images\nameimage.jpg"
You need to go locate your image and see what folder it's in. Then set it according to where you stored the image.
+ 1
If the image is just sitting on your desktop, put it into the folder with the rest of your website. You can put it anywhere, but I'd recommend creating an Images folder to make it more organized.
0
Is rhis right?
<img src="nameimage.jpg" alt:""/>
0
and if the image in on the desktop?
- 1
you can get image path using windows explorer.
- 2
src=...