w3c检测报错。菜鸟求教
刚学用w3c标准做网页,不过哪怕是最简单的代码检测也报错。忘高手指教。
下面是代码1。我在http://validator.w3.org/检测。结果出现一个错误
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>aa</title>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
</head>
<body>
ff
</body>
</html>
错误提示:
Below are the results of attempting to parse this document with an SGML parser.
Error Line 2, column 12: there is no attribute "XMLNS" .
<html xmlns="http://www.w3.org/1999/xhtml">
请问错在哪里?我可是照着教程原样照搬的啊。
加了<link href="style.css" type=text/css rel=stylesheet>一句后,出现了3个错误
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>aa</title>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<link href="style.css" type=text/css rel=stylesheet>
</head>
<body>
ff
</body>
</html>
Below are the results of attempting to parse this document with an SGML parser.
Error Line 2, column 12: there is no attribute "XMLNS" .
<html xmlns="http://www.w3.org/1999/xhtml">
Error Line 7, column 6: end tag for element "HEAD" which is not open .
</head>
Error Line 8, column 5: document type does not allow element "BODY" here .
<body>
请问错在哪里?