当前位置: 首页 > 工具软件 > Microdata > 使用案例 >

html微数据,HTML5之 Microdata微数据

汪翰墨
2023-12-01

- 为何需要微数据

长篇加累版牍,不好理解

微标记来标注其中内容,让其容易识辨

- RDFa

Resource Description Framework

http://www.w3.org/TR/microdata

http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#microdata

http://www.w3.org/TR/rdfa-in-html

--- itemscope 标记

张学友steps ontothe stage ...

刘德华onthe drums ...

阿宝onthe bass...

周杰伦onthepiano ...

这样就将段落中的内容突出出来

--- 搜索引擎如何解析

http://foolip.org/microdatajs/live/ 在线解析

服务器:

{"items":[{"properties":{"musician":["Pat Metheny","Antonio Sanchez","Steve Rodby","Lyle Mays"}

}}]}

所有的prop都被解析

--- Itemprop支持元素

属性 元素

-------------------------------------------------

srcaudio,embed,iframe,img,source,video

hrefa,area,link

datetimetime

contentmeta

dataobject

--- Itemtype 标记

指定数据格式

Saturday, October 9th 2010, just before half past eight in the evening

CommunityTheaterinMorristown,NJ...Orchestrion...

--- 解析

指定使用日历格式解析数据

BEGIN:VCALENDAR

PRODID:jQuery Microdata

VERSION:2.0

BEGIN:VEVENT

DTSTAMP;VALUE=DATE ‐

TIME:20101227T205755Z

DTSTART;VALUE=DATE ‐

TIME:20101009T2030000400

LOCATION:Community Theater

LOCATION:Morristown\, NJ

SUMMARY:Orchestrion

END:VEVENT

END:VCALENDAR

--- 嵌套使用

Orchestrion,October 9th 2010:

A fascinating eveningrated with5stars out of 5 stars.NicosThassofilakas,openWeb.cc

 类似资料: