1

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?

user3309271
  • 11
  • 1
  • 1
  • 2

2 Answers2

0

You have two kind of path to access your image :

  1. Relative src="../images/s4.jpg" (up to parent is relative from where your page is display, here the page is run from direct sub directory).
  2. Absolute src="/images/s4.jpg".
Jean-Luc Barat
  • 1,147
  • 10
  • 18
0

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>
Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140