+ 1

Im not able to make img tag

<img src="D:\VEDAIMAGES\stealth\Watch dogs\ i.jpg " alt=""/> its not working

9th Nov 2016, 6:06 AM
vedansh singh
vedansh singh - avatar
9 Réponses
+ 4
I just noticed you are also missing a second backslash. It's D:\\ not D:\. To clarify, the kind of Url you are using is absolute, not relative. D:\\ is the root folder of the D: unit. EDIT Actually you should use \\ everywhere, not just after the unit letter. Because the backslash character is a special character used to escape, so you have to escape \ itself.
9th Nov 2016, 11:37 AM
Giulio Pellitta
Giulio Pellitta - avatar
+ 2
It is "/",do not "\"
9th Nov 2016, 2:29 PM
summer
+ 2
copy the image to your HTML page folder and write this <img src="image.ext" alt="image" /> if you like you will add the attribut widht and height for your image
9th Nov 2016, 3:57 PM
Alpha Oumar Pathé BAH
Alpha Oumar Pathé BAH - avatar
+ 1
It seems you have a space also between Watch and dogs so I think you probably need to escape it just as you did for the space after dogs.
9th Nov 2016, 6:55 AM
Giulio Pellitta
Giulio Pellitta - avatar
+ 1
First, you're using a relative URL, which means the browser is searching for a D: folder in the same folder that your html page is in. For defining absolute URLs you need to start with a slash (which means "root folder", that can be your server if your code is online, your localhost if you're working with a local server, and I believe your hd/ssd if you're working locally without a local server), like : "/D:/myfolder/myfile.ext" Secondly, you need to use slashes rather than anti-slashes in your URLs, because anti-slash is the character for escaping characters (which means the the character directly after the anti-slash will not be used as a code element but rather displayed as plain text, for the most cases ...) Finally Giulio Pellitta is right, you don't want to use spaces in you URLs as space is use in HTML to separate different code instructions.
9th Nov 2016, 9:07 AM
Sleuvin S
Sleuvin S - avatar
0
the easiest way is to put your images in the same folder as your html files
9th Nov 2016, 10:54 AM
Malvern Panashe Mhepo
Malvern Panashe Mhepo - avatar
0
use forward slash to describe directories instead of bavkward slashes 👍
10th Nov 2016, 8:32 PM
Dhruv Saxena
Dhruv Saxena - avatar
0
Since u have a space between Watch and dog, you need to write /watch%20dog/i.jpg in URL, space must be encoded as %20 http://www.degraeve.com/reference/urlencoding.php
16th Nov 2016, 10:18 AM
Core i9
Core i9 - avatar
0
guys tired hard ok
30th Nov 2016, 10:07 PM
Samcliff
Samcliff - avatar