首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >xhtml验证器

xhtml验证器
EN

Stack Overflow用户
提问于 2010-05-28 00:19:38
回答 1查看 176关注 0票数 1

为什么w3验证器显示错误?

代码语言:javascript
复制
"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.
"

我的代码:

代码语言:javascript
复制
  <!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>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2010-05-28 00:21:31

你读过完整的错误解释了吗?

例如,在HTML语言中,<head>元素必须包含<title>子元素

看起来您没有<title>元素。

票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/2922863

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档