为什么w3验证器显示错误?
"Line 5, Column 7: end tag for "head" which is not finished
</head>
Most likely, you nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>
Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, in HTML the <head> element must contain a <title> child element, lists require appropriate list items (<ul> and <ol> require <li>; <dl> requires <dt> and <dd>), and so on.
"我的代码:
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
Text...
</body>
</html>发布于 2010-05-28 00:21:31
你读过完整的错误解释了吗?
例如,在HTML语言中,
<head>元素必须包含<title>子元素
看起来您没有<title>元素。
https://stackoverflow.com/questions/2922863
复制相似问题