When we use images,videos, document links in the html pages we must provide it source or path in the HTML code. We can provide these source of path in two forms i.e.
Absolute path
Relative path
Ex.:
a1. <img src="c:\\admin\\ball.jpg" />
in above example ball image is stored inside the admin folder which is located in c drive. Above technique is having disadvantage if we copy our html document & put it on another machine the always we need to change the path of image in source. Beacause it is not neccessary that another machine is also have same directory structure.
a2. <img src="ball.jpg" />
In above example we store the image into same folder in which our html document is store. When we want to move our html project on another machine then we just have to copy the folder into removable disk. On another machine our document will correctly run because we use relative path. in above code borwser finds the ball.jpg file in same folder so this technique is reliable because we does not have to change our html source every time when we change the machine.
Similar Examples:
<a href="Default.html">
<sript src="jquery.js">
Absolute path
Relative path
Ex.:
a1. <img src="c:\\admin\\ball.jpg" />
in above example ball image is stored inside the admin folder which is located in c drive. Above technique is having disadvantage if we copy our html document & put it on another machine the always we need to change the path of image in source. Beacause it is not neccessary that another machine is also have same directory structure.
a2. <img src="ball.jpg" />
In above example we store the image into same folder in which our html document is store. When we want to move our html project on another machine then we just have to copy the folder into removable disk. On another machine our document will correctly run because we use relative path. in above code borwser finds the ball.jpg file in same folder so this technique is reliable because we does not have to change our html source every time when we change the machine.
Similar Examples:
<a href="Default.html">
<sript src="jquery.js">