32 users online (1 members and 31 guests)  

Thread: HTML Links...


  Results 1 to 5 of 5

Related

  1. Replies: 1
  2. Replies: 0
  3. links to html pages do not work    Forum: HTML Forum
    Replies: 1
  4. HTML For Links    Forum: HTML Forum
    Replies: 1
  1. #1
    Raider's Avatar
    New User

    Status
    Offline
    Join Date
    May 2003
    Location
    Madrid, Spain
    Posts
    4

    Question HTML Links...

    Hello, I know there is a way to shorten links, for example, if i wanted to link to a different html file but in the same web site (www.my_site.com to www.my_site.com/page1.html).

    It's something like ".../page1.html" but i'm not sure, can someone tell me what i have to put exactley? Thanks in advance!

  2. #2
    Enigma's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Nov 2000
    Posts
    426
    If the two files are in the same directory, it would be:

    <a href="page1.html">Page 1</a>

    If the page1.html file is in a sub-directory called pages, it would be:

    <a href="pages/page1.html">Page 1</a>

    If the page1.html is in a directory one level above, it would be:

    <a href="../page1.html">Page 1</a>

  3. #3
    Raider's Avatar
    New User

    Status
    Offline
    Join Date
    May 2003
    Location
    Madrid, Spain
    Posts
    4
    Isn't there some way i can make a link like:

    .../folder_1/folder_2/file.htm

    so it adds "/folder_1/folder_2/file.htm" to the original URL?

    (If your URL is www.mysite.com and you use the link above, it will take you to www.mysite.com/folder_1/folder_2/file.htm)

  4. #4
    benzden's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Feb 2002
    Location
    San Antonio, Texas
    Posts
    652
    Don't understand that last question - the answer being given.

    It should be noted that the ../ portion of that relative link is redundant and not needed when linking from the root/main directory at the web host server - but it also works to go from folder2/index.html back (../) one level to the root and then into the folder_1/folder_2/file.htm, which is nested two levels deep off the root/main.

  5. #5
    Enigma's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Nov 2000
    Posts
    426
    Originally posted by Raider
    Isn't there some way i can make a link like:

    .../folder_1/folder_2/file.htm

    so it adds "/folder_1/folder_2/file.htm" to the original URL?

    (If your URL is www.mysite.com and you use the link above, it will take you to www.mysite.com/folder_1/folder_2/file.htm)
    <a href="folder_1/folder_2/file.htm">Click here</a>



Tags for this Thread