hCalendar essentials
hCalendar is a powerful microformat that will allow your events to be distributed across web sites, media and devices.
Very much like hCard, hCalendar is comprised of standardized classes appended to XHTML tags. The following is the essential guide to hCalendar.
You can code your very own hCalendar very easily. There are only three required elements that may be appended to any XHTML tag.
- vcalendar or vevent (this is the root tag and all other classes must fall within this tag)
- dtstart
- summary
An example of the most basic hCalendar item is this:
If you want to add more information to your events, you can use the following classes appended to any XHTML tag.
| Description | hCalendar identifier |
|---|---|
| vevent can be within vcalendar, but either is recognized as an hCalendar entry | class="vcalendar" or class="vevent" |
| Date and time your event begins in ISO format | class="dtstart" |
| The physical location of your event | class="location" |
| A URL related to the event | a class="url" |
| The event end time | class="dtend" |
| The duration of the event | class="duration" |
| You may categorize your events | class="category" |
| Description | class="description" |
| You can really pinpoint your location with latitude and longitude information | class="geo" |
This is an example of a more complex hCalender event.
Resources
- The hCalendar creator is very useful.
- hCalendar information on microformats.org