`
jgsj
  • 浏览: 962344 次
文章分类
社区版块
存档分类
最新评论

Google 微数据,快速指引。

 
阅读更多

最后结果图:

即:

Phodal | A geek's life.

www.phodal.com/
太白南路168号 陕西省-计算机工程师-西安文理学院
网页摘录会显示在这里。我们无法显示您网页的文字,因为文字必须符合用户输入的查询才会显示。


即:

Phodal | A geek's life.

www.phodal.com/
250 条评论-消费水平:$$
网页摘录会显示在这里。我们无法显示您网页的文字,因为文字必须符合用户输入的查询才会显示。




开始之前:

关于微数据:数值数据库的数据结构可以使单元形式,也可以是表册形式。前者是对原始数据的模拟,后者则是对统计表格的机读模拟。以单元形式存储的有民意测验和物质属性等数据,每条数据库记录的内容是一个民意测验的回答,或是一种化学物质的属性,这种数据被称为“微数据”。

开始

测试工具网址:http://www.google.com/webmasters/tools/richsnippets?

我们以第一个为例,做简要论述:

参照参数网址:http://www.data-vocabulary.org/Person/

Property Description
name(fn) Name.
nickname Nickname.
photo An image link.
title The person’s title (for example, Financial Manager).
role The person’s role (for example, Accountant).
url Link to a web page, such as the person’s home page.
affiliation(org) The name of an organization with which the person is associated (for example, an employer). Iffnandorghave the exact same value, Google will interpret the information as referring to a business or organization, not a person.
friend Identifies a social relationship between the person described and another person.
contact Identifies a social relationship between the person described and another person.
acquaintance Identifies a social relationship between the person described and another person.
address(adr) The location of the person. Can have the subpropertiesstreet-address,locality,region,postal-code, andcountry-name.

        <div itemscope itemtype="http://data-vocabulary.org/Person">
           我的名字是:<span itemprop="name">Phodal</span><br />
           昵称:<span itemprop="nickname">Phodal</span><span itemprop="author" class="fn">  gmszone</span> <br />
           
           住在<span itemprop="address" itemscope
              itemtype="http://data-vocabulary.org/Address">
              <span itemprop="locality">太白南路168号</span>
              <span itemprop="region">陕西省</span> <br />
           </span><br />
           主页是:<a href="http://www.phodal.com" itemprop="url">Phodal's Homepage</a><br />
            <span itemprop="address">墨颀</span>
           

           我是 <span itemprop="title">计算机工程师</span>
           <span itemprop="">学生</span><br />
           目前在<span itemprop="affiliation">西安文理学院</span>上学。
        </div>  

在网址上预览就可以得到第一个结果。

地址的参数如下:

Property Description
street-address The street address.
locality The locality (e.g., a city).
region The region (e.g., a state).
postal-code The postal code.
country-name The name of the country.

同理我们就可以得到二图

<div itemscope itemtype="http://schema.org/Restaurant">
  <span itemprop="name">GreatFood</span>

  <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
    <span itemprop="ratingValue">4</span> stars -
    based on <span itemprop="reviewCount">250</span> reviews
  </div>
  
  Price Range: <span itemprop="priceRange">$$</span>
  Takes Reservations: Yes
</div>

就这样了。。。
enjoy it.


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics