有效的XHTML:“;“项目范围”;不是为任何属性指定的组的成员

有效的XHTML:“;“项目范围”;不是为任何属性指定的组的成员,html,xhtml,w3c-validation,Html,Xhtml,W3c Validation,我正在尝试将我的文档验证为XHTML1.0Transitional(W3C)。我有以下错误: “itemscope”不是为任何属性指定的组的成员 对应于此代码的: <body class="innerpage" itemscope itemtype="http://schema.org/Physician"> <body class="innerpage" itemscope itemtype="http://schema.org/Physician"> <!--

我正在尝试将我的文档验证为XHTML1.0Transitional(W3C)。我有以下错误:

“itemscope”不是为任何属性指定的组的成员

对应于此代码的:

<body class="innerpage" itemscope itemtype="http://schema.org/Physician">

<body class="innerpage" itemscope itemtype="http://schema.org/Physician">
<!-- Facebook Conversion Code for Leads -->
<script type="text/javascript" src="js/face.js"></script>
   </body>
</html>

如何解决这个问题


谢谢

不幸的是,这是不可能的,因为对这些属性(itemscope、itemtype)一无所知。您可以通过下载到计算机并尝试在该文档中查找(Ctrl+F)单词
itemscope
itemtype
来说服自己。您将得到0个结果

基本上,从这里开始,你有两个选择:

  • 如果要继续使用
    itemscope
    itemtype
    属性,请 如果您必须切换到HTML5 doctype,那么您的文档将如下所示 详情如下:

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Title</title>
    </head>
    <body class="innerpage" itemscope itemtype="http://schema.org/Physician">
    <p>Content</p>
    </body>
    </html>
    
  • 这将导致:


    此文档已成功签入为-//W3C//DTD XHTML+RDFa 1.1///EN

    要使每一页都有效,生命是短暂的,只需重新定义您是否必须使用XHTML doctype,或者您是否可以切换到HTML5?将此文档作为XHTML 1.0过渡性文档检查时发现错误!DOCTYPE html PUBLIC“-//W3C//DTD XHTML 1.0 Transitional如果代码嵌入到列表中,则需要将每行代码缩进八个空格。我已经为您修复了格式设置。我已经编辑了您的文章,无需执行任何其他操作。“回滚”意味着完全撤消编辑。
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN"
        "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Title</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    </head>
    <body class="innerpage" vocab="http://schema.org/" typeof="Physician">
    <p>Content</p>
    </body>
    </html>