0
hello everyone, can you tell me how to insert an image? <img src="image.jpg" alt="" /> I use this syntax but it doesn't work.
6 Respostas
+ 4
The easiest way to get the url of the file is to drag and drop the image file onto a web browser, then you can see the file url in the address bar.
Sorry mate, I was doing something, I couldn't respond earlier :)
+ 3
@Nawid Nazari, in this case, make sure the image file is located on the same path with your HTML file, because otherwise you'd need to specify the path to the file rather than just the filename.
If it's a remote resource, e.g. a file on Google drive or free image hosting service make sure the url is correct, paste the url on browser address bar to test if the url is valid/accessible.
Hth, cmiiw
+ 3
- What is your desktop Operating system, Windows, Linux, or Mac?
- What application/program do you use to edit your HTML file?
- Can you post your code here so others can see where the problem is?
You can use relative path to refer to the image, let's say we have this directory structure:
/web/html/yourfile.htm
/web/images/img1.png
You can refer to the img1.png file from your yourfile.htm like this:
<img src="../images/img1.png" alt="Sample image" />
Hth, cmiiw
+ 1
it's still not working, don't know what to do.
0
The image is located on the desktop, how can I find the url of the image?
0
Thank you dear Ipang