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

2020-05-08 10:13:28易采站长站整理
,该URL涵盖了所有非提案微格式:

<head profile="http://purl.org/uF/2008/03/“>

如果您同时引用非提案和提案微格式,您同样可以使用上面这条组合Profile声明。

示例

本博客相对比较新,因此,我还没有更多的机会列举一些事件信息。实际上,我只有一个在线的例子,感谢最近一篇BarCamp Albuquerque 3的文章,在那里我使用了hCalendar微格式:

<div class=”vevent”>
<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>
<dl>
<dt>When:</dt>
<dd><abbr class=”dtstart” title=”2008-09-13T09:00:00″>September 13</abbr>–<abbr class=”dtend” title=”2008-09-14T18:00:00″>14</abbr>, from 9am–6pm both days</dd>
<dt>Where:</dt>
<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>
<dt>What:</dt>
<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>
</dl>
</div>

说说各部分

我们将上面的例子分开讨论一下。

“根”:vevent

您可能注意到在我例子中的根属性是vevent,而不是vcalendar。这是因为hCalendar有一个可选的根元素,只有在您需要在页面中描述超过一个日历事件时才需要出现。对于尽有一个日历事件的网页,vcalendar属性被假设已经出现在页面中。既然我的例子只是一个事件,我把所有的事件信息都包含在<div class="vevent">中,意味着所有的内容描述的都是同一个事件。

包含他的元素可以是任何元素(<dl>,<ul>,<p>,<span>等等)。<div>就满足我例子的要求了。