Rank Beginner Posted September 21, 2010 Report Share Posted September 21, 2010 I am following the Beginners Video #10 at 8 minutes. I created my links and copied them per directions. They look like links and act like links, but when I click on them I get the "Internet Explorer Cannot Display the Webpage" error message. Here is what my code looks like. I've named my files slightly differently than the video speaker has named his, but I've triple checked my file names and they are correct: <li><a href="ProductList.html">Products</a></li> <li><a href="CSS.html">CSS</a></li> <li><a href="Tables.html">Tables Tutorial</a></li> All of my files created during this course are on my desktop on my PC running Windows XP. How does the browser know to look on my desktop for the pages that I've tried to link? I didn't give any instructions in my coding about where the files were. Can anyone point out what I'm missing? Thanks! Quote Link to comment Share on other sites More sharing options...
Webkiller Posted September 21, 2010 Report Share Posted September 21, 2010 Rank Beginner put them on your shared server or server in your root directory. When you have your domain it will link to them in your root. It would come up as http://www.yoursite.com/productlist.html on the web. <li><a href="/productlist.html">Products</a></li> <li><a href="/blah.css">CSS</a></li> <li><a href="/tables.html">Tables Tutorial</a></li> PS if you want a css file you name it blah.css Quote Link to comment Share on other sites More sharing options...
falkencreative Posted September 21, 2010 Report Share Posted September 21, 2010 Here's one thing to check that often trips beginners up... By default, Windows hides the file extensions on file types. So, if you have that set, it's possible that your "productlist.html" file is actually named "productlist.html.html" or "productlist.html.txt" which is causing issues. I talk more about this issue and how to fix it here: http://www.killersites.com/community/index.php?/topic/3010-cant-open-my-website/page__gopid__16509entry16509 Quote Link to comment Share on other sites More sharing options...
Wickham Posted September 21, 2010 Report Share Posted September 21, 2010 (edited) Just to pad out what others have said, <a href="ProductList.html">Products</a> is a relative link. To use this type of link the file with the link and the file you are trying to link to should be in the same folder, probably including your homepage or index file. If your files are in the Desktop, they should all be there, although most people would set up a separate folder just for their website. When you upload to a server, files with that type of link need to be in the root directory because you haven't stated any sub-directory like directory2 <a href="directory2/ProductList.html">Products</a> where ProductList.html would be in the sub-directory. Webkiller's suggestion of <a href="/ProductList.html">Products</a> is a root-relative link because of the first / and it means that the html file with the link in it can be in the root directory or a sub-directory or a sub-sub-directory and the link will always go back to the root directory to look for ProductList.html but in your case you won't need to use the root-relative method if you don't have any sub-folders (sub-directories). Root-relative links have the disadvantage that they usually don't work on your computer because the root is C:\ and the file you are looking for is unlikely to be in that folder. However, root-relative links are useful for the online page where the root directory is the directory you have put your files in. It just makes checking your website on your computer difficult because the links don't work, but they do online. Check the extension like falkencreative says and delete any extra extension that may have been automatically added. Edited September 21, 2010 by Wickham Quote Link to comment Share on other sites More sharing options...
Rank Beginner Posted September 21, 2010 Author Report Share Posted September 21, 2010 Here's one thing to check that often trips beginners up... By default, Windows hides the file extensions on file types. So, if you have that set, it's possible that your "productlist.html" file is actually named "productlist.html.html" or "productlist.html.txt" which is causing issues. I talk more about this issue and how to fix it here: http://www.killersites.com/community/index.php?/topic/3010-cant-open-my-website/page__gopid__16509entry16509 Quote Link to comment Share on other sites More sharing options...
Rank Beginner Posted September 21, 2010 Author Report Share Posted September 21, 2010 Thanks, falkencreative, you were right. The three files I had created by copy/paste were actually named whatever.html.hlml. I changed them back to .html, and the links now work. Thanks for helping a Rank Beginner. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.