Reputation: 9
Suppose I have a folder named Imp and in it,I have a webpage folder and a images folder.I have my webpage in webpage folder and my images in images folder. So, how can I give the path of an image s4.jpg present in images folder from a webpage in webpages folder..i mean what should I write in the src attribute of img tag?
Upvotes: 0
Views: 16923
Reputation: 1
If In documents folder of c drive you have made a folder imp and in the imp, you have made another folder named - "images"
then your code should be -
<img src="../imp/images/filename.ext>
Upvotes: 0
Reputation: 1165
You have two kind of path to access your image :
src="../images/s4.jpg"
(up to parent is relative from where your page is display, here the page is run from direct sub directory).src="/images/s4.jpg"
.Upvotes: 0