小编rol*_*and的帖子

搜索结果中的微数据站点名称:"此时元素链接上不允许使用属性itemprop."

来自Google Developers的我将此示例用于Microdata,以在搜索结果中包含网站名称:

<head itemscope itemtype="http://schema.org/WebSite">
    <title itemprop='name'>Your WebSite Name</title>
    <link rel="canonical" href="https://example.com/" itemprop="url">
</head>
Run Code Online (Sandbox Code Playgroud)

使用W3C Validator我收到此错误消息:

错误:此时元素链接上不允许属性itemprop.

什么是正确的标记?

html5 w3c-validation microdata

3
推荐指数
1
解决办法
880
查看次数

标签 统计

html5 ×1

microdata ×1

w3c-validation ×1