html – 是否可以为opengraph和schema.org使用相同的元标记

我不喜欢文档头部的标签数量.
这是一些元标记的示例.
<!--w3c-->    
<title>Page Title</title>
<Meta name="description" content="great description">

<!--schema.org-->
<Meta itemprop="name" content="Page Title">
<Meta itemprop="description" content="great description">

<!-- opengraph-->
<Meta property="og:title" content="Page Title">
<Meta property="og:description" content="great description">

是否可以组合标签/属性来减少代码大小而不影响SEO
例如
< title itemprop =“name”>页面标题< / title>
itemprop属性可以在任何地方使用,所以我很确定这很好
但据我所知,property =“og:*”属性必须与元标记一起使用.
那么以下标记是否可以接受?

<Meta name="description" itemprop="description" property="og:description" content="great description">

这将如何影响SEO

非常感谢

解决方法

HTML RDFa 1.1和Microdata extend HTML5的元元素.

HTML+RDFa 1.1 (W3C Recommendation)定义:

If the RDFa @property attribute is present on the Meta element,neither the @name,@http-equiv,nor @charset attributes are required and the @content attribute MUST be specified.

Microdata (W3C Note)定义:

If a Meta element has an itemprop attribute,the name,http-equiv,and charset attributes must be omitted,and the content attribute must be present.

这意味着:

>不允许将Microdata的itemprop属性与HTML5的name属性一起使用.
>允许将RDFa的属性属性与HTML5的name属性一起使用:

<Meta name="description" property="og:description" content="great description" />

(possibly an issue在体内代替头部)
>如果没有提供HTML5的name属性,似乎允许使用Microdata的itemprop属性和RDFa的属性属性

<Meta itemprop="description" property="og:description" content="great description" />

(但W3C Nu Html Checker报告错误)

相关文章

Mip是什么意思以及作用有哪些
怎么测试Mip页面运行情况
MIP安装的具体步骤有哪些
HTML添加超链接、锚点的方法及作用详解(附视频)
MIP的规则有哪些
Mip轮播图组件中的重要属性讲解