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?
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">
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.