link path

liunx

Guest
This is probably a very easy question but when setting up links between pages do you have to put in the full path ie. <!-- w --><a class="postlink" href="http://www.xmas.com/tinsel">www.xmas.com/tinsel</a><!-- w -->. I ask this becos when you are creating the site, for example in frontpage, you only need to put in tinsel.html rather than the whole lot.<!--content-->no, the only time you really need a full (absolute) path is when you're linking to or calling up something from offsite. generally speaking.<!--content-->a little more detail on paths.<br />
<br />
an absolute path starts from what is called the root - this is usually a drive letter on a PC, or network address, ie,<br />
<br />
C:\My Documents\blat\blah.doc<br />
<br />
or<br />
<br />
\\10.30.40.200\somefolder\somefile.ext<br />
<br />
<br />
<br />
It is possible to use relative paths - so called because they are worked out from the path of the currently open file, so by setting a link to another file in the same folder, you can just use the filename.<br />
<br />
It is also possible to go deeper into the file structure, as well as up through the parents, like so:<br />
<br />
\somefolder\somefile.ext<br />
<br />
or<br />
<br />
..\..\somefile.ext<br />
somefile is up two levels here<br />
<br />
the '..' is from old computer code, where '.' meant the current folder, '..' meant the current folder's parent, and '...' returned you to the root folder.<br />
<br />
so there you go, paths in a nutshell.<br />
<br />
HK<!--content-->
 
Back
Top