When I validate my web page, sometimes the conformance checker will validate the following random code instead of my web page.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> -->
<HTML>
<HEAD>
<META HTTP-EQUIV="Refresh" CONTENT="0.1">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<TITLE></TITLE>
</HEAD>
<BODY><P></BODY>
</HTML>
When it does this, I can select the "show source" option and re-validate the page until my source shows up, which conforms to html5 just fine.
Why do I get this random code sometimes? I usually wouldn't care, but one of my professors keeps trying to dock my assignments for not conforming. Sadly, he doesn't have any suggestions on how to fix this. Please let me know if there is something I can change in my code to avoid random substitutions in the conformance checker.
I am using the checker at validator.w3.org
The following is a sample of my code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link href="/css/default.css" type="text/css" rel="stylesheet" media="screen">
<title>Database Plan</title>
<?php include $_SERVER["DOCUMENT_ROOT"]."/modules/googleanalytics.inc"; ?>
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div id="wrapper">
<header id="header">
<div id="redback">
<?php include $_SERVER["DOCUMENT_ROOT"]."/modules/header.inc"; ?>
</div>
</header>
<nav id="navtop">
<div>
<?php include $_SERVER["DOCUMENT_ROOT"]."/modules/topnav.inc"; ?>
</div>
</nav>
<div id="centerbox">
<div id="article">
<article id="innerarticle">
<div>
<p>Article Content</p>
</div>
</article>
</div>
</div>
<footer id="footer">
<div id="grayback">
<?php include $_SERVER["DOCUMENT_ROOT"]."/modules/footer.inc"; ?>
</div>
</footer>
</div>
</body>
</html>