开发者

Links when uploading

开发者 https://www.devze.com 2023-03-01 23:45 出处:网络
oHi i\'m new to web design and am just wondering i have my site made and my links go as following <li id=\"active\"><a href=\"Index.html\">Home</a></li>

oHi i'm new to web design and am just wondering i have my site made and my links go as following

<li id="active"><a href="Index.html">Home</a></li> 

<li><a href="Lakes.html">Where to Fish</a></li>

<li><a href="specimenfish.html">Specimen Fish</a></li>

<li><a href="gallery.html开发者_开发技巧">Gallery</a></li>

<li><a href="Prebait.html">Pre Bait</a></li>

do i need to change them to site name .com when uploading to hosting site example below

<li><a href="www.sitename.com/Lakes.html">Where to Fish</a></li>

  • Specimen Fish
  • Thanks all


    you don't need to change them as long as they are in the same folder

    same folder
    <li><a href="Lakes.html">Where to Fish</a></li>

    next folder
    <li><a href="folder_name/Lakes.html">Where to Fish</a></li>

    one folder up
    <li><a href="../Lakes.html">Where to Fish</a></li>

    inside folder which is in one folder up
    <li><a href="../folder_name/Lakes.html">Where to Fish</a></li>

    direct URL (if you want link to a file from certain folder on your server and it's too complex to do it with the previous examples - or if you want to link to file from another server)

    <li><a href="http://www.servername.com/folder/Lakes.html">Where to Fish</a></li>

    hope it helps you


    As long as your links (gallery.html, prebait.html, etc.) are in the same directory as the file containing those links, you're fine. It's called a relative URL - you don't need to specify the entire URL; you're navigating based on a shared parent directory.


    use http:// at first of href, it means :

    <li><a href="www.sitename.com/Lakes.html">Where to Fish</a></li>

    must change to :

    <li><a href="http://www.sitename.com/Lakes.html">Where to Fish</a></li>

    0

    精彩评论

    暂无评论...
    验证码 换一张
    取 消