1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Strange w3c validation error

Discussion in 'HTML & Website Design' started by jumpenjuhosaphat, May 12, 2007.

  1. #1
    I am trying to validate my site using the w3c validator. The only way that I can get it to validate is if I remove the </head> and <body> tags. So my page structure looks basically like:

    
    <doctype>
    <html>
    <head>
    <title></title>
    <link rel="">
    
    <div class="main">
    
    </div>
    </body>
    </html>
    
    Code (markup):
    The URL of the site is http://www.linkslinky.com

    Is this an error with the validator, or are the closing head tag and opening body tag really going against the w3c standard?
     
    jumpenjuhosaphat, May 12, 2007 IP
  2. wing

    wing Active Member

    Messages:
    210
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    58
    #2
    You are using doctype:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

    But your code is in xhtml style

    Try to remove the trailing slashes from your code. IE: <link rel = "stylesheet" type="text/css" href="style.css" />

    etc...

    Or try to use doctype XHTML 1.0 Transitional :)

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="us-en" xml:lang="us-en">
     
    wing, May 12, 2007 IP
    jumpenjuhosaphat likes this.
  3. jumpenjuhosaphat

    jumpenjuhosaphat Peon

    Messages:
    229
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Great...That was it, all I had to do was get the correct DOCTYPE in place. I only had one error, a missing closing tag.
     
    jumpenjuhosaphat, May 12, 2007 IP