Hi this is the first time I am asking a question here.
I have a image src as
src="images//images/pixel.gif"
But I dont understand this double forward slashes (//) in the src.
Also what is the meaning of “./” and “../” in a relative file path like in below src:
src="./images/pixel.gif"
src="../images/pixel.gif"
An initial
/means the root of the web page.A directory entry with name
.means the same directory. If it’s at the beginning, it normally means something like “here” and mostly used to clarify that the path is relative to the present location.A directory entry with name
..means the parent directory. So, this means going up the directory tree.If two or more
/are consecutive, this cancels all previous path and replaces with the root of the web page.That said,
src="images//images/pixel.gif"means/images/pixel.gif(directly at the root directory, a folder with nameimages, and then the file.src="./images/pixel.gif"means a directoryimagesinside the same directory where the loaded page resides (the one containing the reference to the image). Remember the here concept. You could also write directlysrc="images/pixel.gif".src="../images/pixel.gif"means going up to the parent directory in which resides the loaded page and then go down to a directory namedimages. Remember the parent concept.Hope helped!