Microdata可以应用于任何类型的HTML元素吗? [英] Can Microdata be applied on any type of HTML element?

查看:111
本文介绍了Microdata可以应用于任何类型的HTML元素吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在网络的所有例子中,我看到应用于 itemscope 和 itemtype > div 元素,如下所示:

In all examples around the web I see Microdata properties itemscope and itemtype being applied to div elements, like so:

<div itemscope itemtype ="http://schema.org/Movie">
  <h1 itemprop="name">Avatar</h1>
  <span>Director: <span itemprop="director">James Cameron</span> (born August 16, 1954)</span>
  <span itemprop="genre">Science fiction</span>
  <a href="../movies/avatar-theatrical-trailer.html" itemprop="trailer">Trailer</a>
</div>

但是Microdata可以应用于任何其他元素,在我的情况下我想将它应用于列表item:

But can Microdata be applied on any other element, in my case I want to apply it to a list item:

<ul>
<li itemscope itemtype ="http://schema.org/Movie">
  <h1 itemprop="name">Avatar</h1>
  <span>Director: <span itemprop="director">James Cameron</span> (born August 16, 1954)</span>
  <span itemprop="genre">Science fiction</span>
  <a href="../movies/avatar-theatrical-trailer.html" itemprop="trailer">Trailer</a>
</li>
</ul>

是否有任何已知的问题?

Are there any known problems with this?

推荐答案

简单地说,是。请亲自查看Google页面,以便他们使用不同的代码: https:// support.google.com/webmasters/answer/176035?hl=zh_CN

Simply put, "Yes". Check out the Google page yourself to see them use it in different tags: https://support.google.com/webmasters/answer/176035?hl=en

这篇关于Microdata可以应用于任何类型的HTML元素吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆