vbgunz -
Joined: 02 Feb 2003 Posts: 615 Location: Florida
|
Posted: Sun May 04, 2003 6:58 am Post subject: |
|
|
You'll have to be a little more definitive about how you wish to add links. Assuming you're new at them, heres a few styles...
You basically have 4 styles, all up to you... Please pay special attention to the period between the a and href... (<a.href) It should not be in any of your links BUT is so only here because it is important to try and keep the code on one line... So, remember to remove the period, the dot between a and href on YOUR links...
1. Absolute: <a.href="http://www.vbgunz.com">vbgunz</a>
Includes the http://www. and ending domain extension.
2. Relative: ../
Based on the tree and current files location
a.) If the file you wish to link too already exist in the same directory you'll simply link to it as <a.href="name.html">hello</a>
b.) If the file you wish to link to is one level up you'll add "../" and if it is two levels high you'll simply add "../../", so if you wanted to link to a file 3 levels high you'll make the link as so <a.href="../../../name.html">hello</a> and so on...
c.) If the file you wish to link to is one level deep you'll start with the first folder going deep... for example if you're already in your home directory and theirs a folder in their named onelevel your link will start like this <a.href="onelevel/">hello</a> so if you wanted to link to name.html from your homepage the link will look like this <a.href="onelevel/name.html">hello</a>
3. Site Relative: /
Links always start with the forward slash / which signifies to start from the home directory...
Pretend you had this structure... home/onelevel and in both folders was an index.html file... From your home directory you can link to the index in onelevel like this <a.href="/onelevel/index.html">hello</a> (notice the first slash in this link) and while you were in one level to link back you will simply add a forward slash (starts from home) and the files name like this <a.href="/index.html">hello</a>
3. Anchors: <a name="anchor"></a>
A two step process... Pretend you had a long document and a juicy paragraph existed midway down the page titled Now Featuring... Within the HTML navigate to Now Featuring within the code and apply this snippet <a name="nowfeature"></a> - To link to it you'll have two options.
a.) Starting from the same document a link would look like <a.href="#nowfeature">Now Featuring</a>
b.) To link to an anchor from another page you can use either an absolute, relative or a site relative link to the document + the anchor link... Pretend the anchor link existed in your home directory on your index page... If you wanted to link to it from the directory onelevel then it could look like this <a.href="/index.html#nowfeature">Now Featuring</a>
Just remember linking to an anchor link from a page outside the originating page you'll have to define the page name and extension + the anchor name...
Good luck :) _________________ Victor B. Gonzalez
http://aeonserv.com |
|