|
WebTV JavaScript Bug Alert
Reload Page
CMD + R for 3 Seconds
Computer users, this site is designed by and for the WebTV/MSNTV Internet Terminal and may not display or function as intended for you.
Using Relative URLsRelative URLs should be used when linking inside your own server or account. It's proper HTML syntax; things load faster, and you use less bandwidth. It works for linking to .html pages, as well as image and audio files and when using SSI.
If the thing you are linking to is in the same directory, or in it's subdirectory, you can just use the file name like this:
To go "down" one step to the previous directory you will use 2 periods and a backslash ../ If you are building a page in a sub-directory (we will call it SUB) and you have other directories of images (called IMG) and one of midis (called MID), your page codes will be like this. For an image:
If you are building inside a sub-directory of another sub-directory you will use the ../ for each level you need to step down. Example, the page URL is: http://www.server.com/UserName/SUB-1/SUB-2/Page.html Now we will say that an image you want is in your IMG directory, the code should look like this:
^ Proper code ^ v Improper code v
If you are making the page in your main directory and want to call an image from your IMG directory, the tag will be this: Never start a relative link with a slash unless you are linking to another person's account on the same server, and an example would be like this: Say we both have a Geo account, and if I am making a page, I can link to your images by doing this:
The above code will let me link to your account without going off Geocities - then back on Geocities again like it would if you used the full URL
Using Relative URLs "out of" your accountYou can use relative URLs without being in your homepage account, and you can do this by using the <base href> tag. This specifies the base URL for all relative URLs on the page. When used on a webpage, it should be placed in the <head> section, but when used in a sig, it can be placed anywhere. The tag is:
For all images, audio, or any other included file, you can now use normal relative URLs just like we talked about before, by picking up the URL from where the base href left off. I have seen many people use a base href tag when within their own account. This is not needed, since the browser will use this as default anyway. I will often add the base href tag when I am helping someone with a page because I transload their page to my account to work on, then add the base href and use relative URLs to make included files show up. After I'm finished, I remove the <base href..> and transload it back into their account, and everything works as it should.
Relative URLs in a SigI also like to use relative URLs in my sig. To do this, we will add a <base href> tag again. Just set up the sig something like this:<html> |
<base href="http://driver70.tv/">
|
Search New2HTML.com
powered by FreeFind |
|
|