W3C compliance nazis sign in

Discussion in 'OT Technology' started by Penguin Man, Sep 3, 2004.

  1. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    I have this website damn near compliant, and I just can't stand to leave it with two errors, but I have no idea what the fuck is wrong. When I validate I get the following:

    1. Line 27, column 6: end tag for element "HEAD" which is not open

    </head>

    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.

    If this error occured in a script section of your document, you should probably read this FAQ entry.

    2. Line 29, column 5: document type does not allow element "BODY" here

    <body>

    The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

    One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

    Everything seems to be as it should be, no end tags out of place, no extra end tags, etc.. but it still gives these two errors. Any suggestions on what to look for?

    Code for the relevant section:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    
    <!-- Beginning of the actual page, no headers after this point -->
    <html>
    <head>
    
    <title>Company Name Ltd. - Welcome</title>
    <link rel="stylesheet" type="text/css" href="index.css">
    
    <!-- Image map for the top header -->
    <map name="topheadermap">
            <area shape="poly" coords="300,0,290,51,335,51,350,0" href="index.php?section=home&amp;page=home" alt="Home">
            <area shape="poly" coords="350,0,335,51,400,51,405,0" href="javascript:openSiteMap()" alt="Site Map">
            <area shape="poly" coords="405,0,400,51,445,51,450,0" href="index.php?section=about&amp;page=contact" alt="Contact Us">
            <area shape="poly" coords="450,0,445,51,745,51,750,0" href="index.php?section=about&amp;page=ohgroup" alt="O'Hanlon Group of Companie
    s">
    </map>
    
    <!-- I like to put this here rather than having a huge long string in each site map link -->
    <script type="text/javascript">
            function openSiteMap() {
                    window.open('home/sitemap.html','SiteMap','height=500,width=550,location=no,menubar=no,resizable=no,personalbar=no,status=no,
    toolbar=no');
                    document.location="#";
            }
    </script>
    
    </head>
    
    <body>
     
  2. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    Figured it out. Didn't like the <map> being in the head, moved it to the body and now it's fine. A compliant page that looks decent in all browsers, this is a good day.

    :joshers:
     
  3. CompiledMonkey

    CompiledMonkey New Member

    Joined:
    Oct 26, 2001
    Messages:
    8,528
    Likes Received:
    0
    Location:
    Richmond, VA
    What's the site?
     
  4. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    New company website. Not up for the public yet, still being reviewed and revised.
     
  5. CompiledMonkey

    CompiledMonkey New Member

    Joined:
    Oct 26, 2001
    Messages:
    8,528
    Likes Received:
    0
    Location:
    Richmond, VA
  6. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    It's the only thing I've ever designed that actually looks nice :embd:
     
  7. The Bastard

    The Bastard Guest

    Harsh critics of OT will be the judge of that.
     
  8. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    I'll post a screenshot once my computer is back up and running if you want :dunno: It's not flashy, just a nice-looking functional site.
     

Share This Page