SitePoint Sponsor

User Tag List

Results 1 to 16 of 16
  1. #1
    SitePoint Addict
    Join Date
    Aug 2008
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    linking between pages

    So, I am trying to do the basic linking between a few pages in the Build your own website the right way book. Everything on the page looks good, but when i click on the link to go to the other page then I just get an error message saying "Internet Explorer cannot display the webpage" I swear that my code is identical to what is in the book. What could be the problem? Here is the code from one of the pages.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">



    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />


    <head>

    <title>"About BubbleUnder.com who we are; what this site if for."</title>

    </head>

    <body>

    <div id="header">
    <div id="sitebranding">
    <h1>BubbleUnder.com</h1>
    </div>
    <div id="tagline">
    <p>Diving club for the south-west UK - Let's make a splash!<p>
    </div>
    <!-- end of header div-->

    <div id="navigation">

    <ul>
    <li><a href="index.html">Home</a></li>
    <li><a href="about.html">About Us</a></li>
    <li><a href="contact.html">Contact Us</a></li>
    </ul>

    </div> <!--end of navigation div -->


    <div id = "bodycontent">


    <div align=left>

    <h2>About us</h2>
    <p>Bubble Under is a gorup of diving enthusiasts based in the south-west UK who meet up for diving trips in the summer months when the weather is good and the bacon rolls
    are flowing. We arange weekends awaya as small groups to cut the costs of accomodation and travel, and to ensure that everyone gets a trustworthy dive buddy.</p>

    <p>Although we're based in the south-west, we don't stay on our turf: past diving weekends away have included trips up to Scapa Flow in Scotland and to Malta's
    numerous wreck sites<p>
    <p>When we're not diving, we often meet up in local pub to talk about our recent adventures (any excuse, eh?).</p>

    </div> <!-- end of bodycontent div -->







    </body>

    </html>

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which link is it that doesn't work? Does the page you're trying to reach exist in that location?
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Wizard Blake Tallos's Avatar
    Join Date
    Jun 2008
    Location
    Cuyahoga Falls, Ohio.
    Posts
    1,511
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, yes your links are correct - <a href="http://www.yourdomain.com" alt="name">This is a Link</a> I used the alt attribute in the link i provided.The Altattribute describes the image.When just learning Links on a web page you should get in the habit of providing the Title or the Alt attribute .Its used for slower internet Connections.And are the pages uploaded on to your server? That may be a reason why you are getting a "Internet Explorer cannot display the webpage" Error.Make sure your pages are named the right way also.


    Code CSS:
     
     
    <html>
    <body>
     
    <p>
    <a href="#C4">See also Chapter 4.</a>
    </p>
     
    <h2>Sitepoint</h2>
    <p>This  explains ba bla bla</p>
     
    <h2>Sitepoint</h2>
    <p>This  explains ba bla bla</p>
     
    <h2>Sitepoint</h2>
    <p>This  explains ba bla bla</p>
     
    <h2><a name="C4">Sitepoint</a></h2>
    <p>This  explains ba bla bla</p>
     
    <h2>Sitepoint</h2>
    <p>This  explains ba bla bla</p>
     
    <h2>Sitepoint</h2>
    <p>This  explains ba bla bla</p>
     
    <h2>Sitepoint</h2>
    <p>This explains ba bla bla</p>
     
    <h2>Sitepoint</h2>
    <p>This  explains ba bla bla</p>
     
    <h2>Sitepoint</h2>
    <p>This  explains ba bla bla</p>
     
    <h2>Sitepoint</h2>
    <p>This explains ba bla bla</p>
     
    <h2>Sitepoint</h2>
    <p>This explains ba bla bla</p>
     
    <h2>Sitepoint</h2>
    <p>This  explains ba bla bla</p>
     
    <h2>Sitepoint</h2>
    <p>This  explains ba bla bla</p>
     
    <h2>Sitepoint</h2>
    <p>This  explains ba bla bla</p>
     
    <h2>Chapter 15</h2>
    <p>This chapter explains ba bla bla</p>
     
    <h2>Chapter 16</h2>
    <p>This chapter explains ba bla bla</p>
     
    <h2>Chapter 17</h2>
    <p>This chapter explains ba bla bla</p>
     
    </body>
    </html>
    <p><a href="#content">Link to a page anchor</a></p>

    These are Anchor Tags. You can change out all my information and put in youres.
    Blake Tallos - Software Engineer for Sanctuary
    Software Studio, Inc. C# - Fanatic!
    http://www.sancsoft.com/


  4. #4
    SitePoint Addict
    Join Date
    Aug 2008
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, my files were not uploaded to a server and I was wondering why should they be since the book never told me to do that. I realized once I did upload them to a server that I had named them index.html.html. I couldn't see this when the files were on my computer. Well, thanks

  5. #5
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by BlakeAnthony View Post
    Well, yes your links are correct - <a href="http://www.yourdomain.com" alt="name">This is a Link</a>
    Using an alt attribute in a <a> tags is not valid. You can use title if you want to provide extra information, though.

    Quote Originally Posted by BlakeAnthony View Post
    The Altattribute describes the image.
    No, it doesn't, and you're not using an image.

    The alt attribute provides a text equivalent to an image. That's not the same as describing it, except in some very special cases.
    Birnam wood is come to Dunsinane

  6. #6
    SitePoint Wizard Blake Tallos's Avatar
    Join Date
    Jun 2008
    Location
    Cuyahoga Falls, Ohio.
    Posts
    1,511
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you - AutisticCuckoo
    Blake Tallos - Software Engineer for Sanctuary
    Software Studio, Inc. C# - Fanatic!
    http://www.sancsoft.com/


  7. #7
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @BrianBam - Also, keep in mind <div align="left"> is invalid xhtml.
    The align attribute is deprecated unless it is being used within a <td>.

  8. #8
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cooper.semantics View Post
    @BrianBam - Also, keep in mind <div align="left"> is invalid xhtml.
    The align attribute is deprecated unless it is being used within a <td>.
    It's valid in XHTML 1.0 Transitional and HTML 4.01 Transitional, but it's deprecated and invalid in XHTML 1.0 Strict and HTML 4.01 Strict.
    Birnam wood is come to Dunsinane

  9. #9
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Transitional always gets me hehe.

    This is exactly why I want this genius of a man to put out his new book in English so I can read it and become a genius too hahahah

  10. #10
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Transitional DTDs are barely mentioned in that book.
    Birnam wood is come to Dunsinane

  11. #11
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    Transitional DTDs are barely mentioned in that book.
    A year ago some guy I use to work with was telling me to use transitional and code for strict. His reasoning behind this was that strict was quirky with javaScript. I'm not sure if he was emphasizing this based on id convention. Here is an example:

    <div id="post-entry">....</div>
    <div id="post-description">....</div>

    So since each contained the word 'post' he said that this would cause issues in strict mode while using javaScript.

    The only reasoning I could think 'if this were to be the case' is transitional is more forgiving.

    Have you ever heard of this before from anyone, or is this guy way off base?
    Last edited by cooper.semantics; Sep 8, 2008 at 06:48.

  12. #12
    Pedantic Semantic blain's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    528
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does javascript even care about the doctype?
    Technology is dominated by two types of people:
    those who understand what they do not manage,
    and those who manage what they do not understand.

  13. #13
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by blain View Post
    Does javascript even care about the doctype?
    Yeah, I am pretty sure but, I could be wrong

  14. #14
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cooper.semantics View Post
    So since each contained the word 'post' he said that this would cause issues in strict mode while using javaScript.
    That's preposterous. I always use Strict and I use hyphen-separated IDs, and there has never been any problem with JavaScript.

    Quote Originally Posted by blain View Post
    Does javascript even care about the doctype?
    No. JavaScript accesses the DOM tree built by the HTML parser.
    Birnam wood is come to Dunsinane

  15. #15
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    That's preposterous. I always use Strict and I use hyphen-separated IDs, and there has never been any problem with JavaScript.


    No. JavaScript accesses the DOM tree built by the HTML parser.
    Thanks for the clear up. I myself like using 'hypens' because it makes id/class names easier to read.

    I was not sure if his statements were correct or incorrect because I have never heard such as statement before.

    Now I know that my buddy is incorrect.

  16. #16
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cooper.semantics View Post
    Now I know that my buddy is incorrect.
    Either that, or he knows something I don't. That's entirely possible, but I'd be surprised if that were true, because I've never heard anything about it before.
    Birnam wood is come to Dunsinane


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •