{{Short description|Microformat}} {{lowercase}} {{About||details of hCalendar used on Wikipedia|:Wikipedia:Microformats}}
'''hCalendar''' (short for '''''HTML iCalendar''''') is a microformat standard for displaying a semantic (X)HTML representation of iCalendar-format calendar information about an event, on web pages, using HTML classes and ''rel'' attributes.
It allows parsing tools (for example other websites, or browser add-ons<ref>[http://microformats.org/wiki/browsers Microformats.org: Browser Support for Microformats]</ref> like Firefox's Operator extension) to extract the details of the event, and display them using some other website, index or search them, or to load them into a calendar or diary program, for instance. Multiple instances can be displayed as timelines.
==Example==
Consider this semi-fictional example:
<pre> The English Wikipedia was launched on 15 January 2001 with a party from 2-4pm at Jimmy Wales' house (more information). </pre>
The HTML mark-up might be:
<syntaxhighlight lang="html"> <p> The English Wikipedia was launched on 15 January 2001 with a party from 2-4pm at Jimmy Wales' house (<a href="http://en.wikipedia.org/wiki/History_of_Wikipedia">more information</a>) </p> </syntaxhighlight>
hCalendar mark-up may be added using <code>span</code> HTML elements and the classes <code>vevent</code>, <code>summary</code>, <code>dtstart</code> (start date), <code>dtend</code> (end date), <code>location</code> and <code>url</code>:
<syntaxhighlight lang="html"> <p class="vevent"> The <span class="summary">English Wikipedia was launched</span> on 15 January 2001 with a party from <abbr class="dtstart" title="2001-01-15T14:00:00+06:00">2pm</abbr>- <abbr class="dtend" title="2001-01-15T16:00:00+06:00">4pm</abbr> at <span class="location">Jimmy Wales' house</span> (<a class="url" href="http://en.wikipedia.org/wiki/History_of_Wikipedia">more information</a>) </p> </syntaxhighlight>
Note the use of the <code>abbr</code> element to contain the machine readable, ISO8601, date-time format for the start and end times.
==Accessibility concerns==
Concerns have been expressed<ref>[http://www.webstandards.org/2007/04/27/haccessibility/ Web Standards Project, hAccessibility: Abbreviations in Microformats]</ref> that, where it occurs, the use of the <code>abbr</code> element (using the so-called [http://microformats.org/wiki/abbr-design-pattern abbr-design-pattern]) in the above manner causes accessibility problems, not least for users of screen readers and aural browsers.<ref>[http://microformats.org/wiki/assistive-technology Microformats Wiki: Assistive Technology]</ref> The newer [http://microformats.org/wiki/h-event h-event] microformat therefore uses the HTML5 element <code>time</code> instead: <syntaxhighlight lang="xml"> <time class="dt-start" datetime="2013-06-30 12:00">30<sup>th</sup> June 2013, 12:00</time> </syntaxhighlight>
==Geo== The Geo microformat is a part of the hCalendar specification, and is often used to include the coordinates of the event's location within an hCalendar.
==Attributes== <!-- list to follow --> For a full list of attributes, see the [http://microformats.org/wiki/hcalendar-cheatsheet hCalendar cheat-sheet].
==Users== Notable organisations and other websites using hCalendar include: <!--significant examples only, please; listed alphabetically--> *Birmingham Town Hall and Symphony Hall<ref>{{Cite web |url=http://www.birmingham.gov.uk/microformats |title=Microformats – Birmingham City Council<!-- Bot generated title --> |access-date=2010-08-15 |archive-date=2011-01-18 |archive-url=https://web.archive.org/web/20110118010328/http://www.birmingham.gov.uk/microformats |url-status=dead }}</ref> *Facebook<ref name="Protalinski">{{cite web|url=http://www.zdnet.com/blog/facebook/facebook-adds-hcalendar-and-hcard-microformats-to-events/266|archive-url=https://web.archive.org/web/20110219130150/http://www.zdnet.com/blog/facebook/facebook-adds-hcalendar-and-hcard-microformats-to-events/266|url-status=dead|archive-date=February 19, 2011|title=Facebook adds hCalendar and hCard microformats to Events|last=Protalinski|first=Emil|date=2011-02-18|publisher=ZDNet|access-date=24 March 2011}}</ref> *Google (in Google maps<ref>[https://googlemapsapi.blogspot.com/2007/06/microformats-in-google-maps.html Official Google Maps API Blog: Microformats in Google Maps<!-- Bot generated title -->]</ref> and in Search Engine Results Pages <ref>[http://microformats.org/2010/04/28/google-adds-support-for-hcalendar-and-hrecipe-rich-snippets Microformats.org: Google adds support for hCalendar and hRecipe Rich Snippets]</ref><ref>[https://support.google.com/webmasters/bin/answer.py?hl=en&answer=164506 Google Webmaster Tools: Rich snippets - Events]</ref>) *The Opera web browser website<ref>[http://my.opera.com/dstorey/blog/microformats-on-opera-sites David Storey – Microformats on Opera sites<!-- Bot generated title -->]</ref> *The Radio Times<ref name="uf-wild" /> *The University of Bath<ref name="uf-wild">[http://microformats.org/wiki/hcalendar-examples-in-wild hCalendar Examples in the wild · Microformats Wiki<!-- Bot generated title -->]</ref> *The University of Washington<ref name="uf-wild" /> *Upcoming.org<ref name="uf-wild" /> *Wikipedia<ref>Wikipedia:Microformats</ref> *Yahoo!, on Yahoo! Local<ref name="uf-wild" />
==References== {{reflist}}
==External links== * [http://microformats.org/wiki/hcalendar hCalendar at the Microformats Wiki]
{{Semantic Web}}
{{DEFAULTSORT:Hcalendar}} Category:Microformats