Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Dec 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Speaking of validation...

    I've found it quite entertaining reading the long thread on validation, always helpful? But I've found myself stuck with my own page. Yes, it has 12 errors and yes I know what's wrong with the bottom 11. (I'm messing around with PHP, thus the $). But the first error I'm kinda stumped on. Here's what W3C markup validation service gave me.
    ----------------
    Error Line 13, column 86: end tag for element "LINK" which is not open .
    ...ss" href="styles/thwarted.css"></link>
    The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.
    ----------------

    But here is the line it's referring to:

    Code:
    <link id="thislink" rel="stylesheet" type="text/css" href="styles/thwarted.css"></link>
    Any suggestions on why this line doesn't validate?

    BTW, the page is:
    http://www.rustipher.com/~loni/thwarted.php

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    In HTML the link tag has no closing tag, in XHTML it is self closing /> Remove the </link> and it should validate. Also your doctype isn't valid. Change it to this instead.
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

  • #3
    New to the CF scene
    Join Date
    Dec 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    But then won't my div sizes be off? The reason why I chose the strict doctype is because my div sizes were bigger in fire fox than in IE

    oh, and when I do self closing, it give me an error saying that I never had an opening tag for </head> and that <body> is in an invalid position.

  • #4
    New to the CF scene
    Join Date
    Dec 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oops, my divs are fine...


  •  

    Posting Permissions

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