hCalendar微格式 关于事件和基于时间或地点的活

2020-05-08 10:13:28易采站长站整理
http://barcamp.org/BarCampAlbuquerqueclass=”url summary”><span class=”category”>BarCamp</span> Albuquerque 3</a> is this weekend.</p>

您可能会注意到我把url属性同summary写在一起。这是因为<a>中包含的内容恰恰是我日历信息的summary,这只是一种巧合。

category

category属性描述事件的类型。在上面例子中为“BarCamp”:

<p>Yes, it’s short notice, but mark your calendars: <a href="http://barcamp.org/BarCampAlbuquerque" class="url summary"><span class=”category”>BarCamp</span> Albuquerque 3</a> is this weekend.</p>

跟之前提过的属性不同的是,category可以被使用无限次。一些常用的category例子包括:

Meeting
Expo
Vacation
Anniversary
Conference

某种程度上来说,category相当于事件的“标签”。所以,如果我选择标记我的例子包含到BarCamp首页的链接的话,我会同时使用rel-tag微格式和category:

<p>You may be wondering what is <a href="http://barcamp.org/" class=”category” rel=”tag”>BarCamp</a> anyway?</p>

记得吗,rel-tag只能在链接中使用(<a>)。

location

location属性描述事件发生的地点

<dd class=”location vcard”><a class=”fn org url” href=”http://www.chefwhite.com/cjw_cafe.php”>CJW Cafe</a> on <a href=”http://maps.google.com/maps” class=”adr”><span class=”street-address”>4801 Alameda <abbr title=”Boulevard”>Blvd</abbr> <abbr title=”Northeast”>NE</abbr></span>, <span class=”locality”>Albuquerque</span>, <abbr class=”region” title=”New Mexico”>NM</abbr> <span class=”postal-code”>87113</span></a></dd>

description

最后,description属性描述事件比summary更详细的描述

<dd class=”description”>A <abbr class=”duration” title=”P2D”>two-day</abbr> event all about the web — design (visual, experience, information architecture), technology (infrastructure, programming), social and new media, and other stuff that is just plain cool.</dd>

还没有包括哪些

还有一些hCalendar常用的属性我没有在上面例子中使用的:

dtstamp表明hCalendar信息生成的日期和时间
last-modified表明hCalendar信息最近更新的日期和时间