Difference between revisions of "h-event"

From Microformats Wiki
Jump to navigation Jump to search
(fix typo, add subsections, move processing tip for iCalendar in backcompat section)
(drop p-geo p-latitude p-longitude p-altitude as no one has ever used them directly inside an h-event nor vevent. use nested h-geo inside p-location instead.)
Line 39: Line 39:
 
* '''<code>u-url</code>''' - permalink for the event
 
* '''<code>u-url</code>''' - permalink for the event
 
* '''<code>p-category</code>''' - event category(ies)/tag(s)
 
* '''<code>p-category</code>''' - event category(ies)/tag(s)
* '''<code>p-location</code>''' - where the event takes place, optionally embedded [[h-adr]] or [[h-card]] {{main|h-adr}} {{main|h-card}}
+
* '''<code>p-location</code>''' - where the event takes place, optionally embedded [[h-card]], [[h-adr]], or [[h-geo]] {{main|h-adr}} {{main|h-card}}
* '''<code>p-geo</code>''' - geophysical coordinates of the event, optionally embedded [[h-geo]] {{main|h-geo}}
 
* '''<code>p-latitude</code>''' - decimal latitude
 
* '''<code>p-longitude</code>''' - decimal longitude
 
  
 
Experimental properties currently in use in the wild but not (yet) part of the official h-entry spec:
 
Experimental properties currently in use in the wild but not (yet) part of the official h-entry spec:
Line 114: Line 111:
 
* <code>category</code>
 
* <code>category</code>
 
* <code>location</code> - including compat root <code>vcard</code> in the absence of <code>h-card</code>, and compat root <code>adr</code> in the absence of <code>h-adr</code>
 
* <code>location</code> - including compat root <code>vcard</code> in the absence of <code>h-card</code>, and compat root <code>adr</code> in the absence of <code>h-adr</code>
* <code>geo</code> - parse as '''<code>p-geo h-geo</code>''' including compat root <code>geo</code>
+
* <code>geo</code> - parse as '''<code>p-location h-geo</code>''' including compat root <code>geo</code>
* <code>latitude</code>
 
* <code>longitude</code>
 
  
 
=== iCalendar Compatibility ===
 
=== iCalendar Compatibility ===

Revision as of 22:14, 17 September 2013

<entry-title>h-event</entry-title> Tantek Çelik (Editor)


h-event is a simple, open format for publishing events on the web. h-event is one of several open microformat draft standards suitable for embedding data in HTML/HTML5.

h-event is the microformats2 update to hCalendar 1.0.

Per CC0, to the extent possible under law, the editors have waived all copyright and related or neighboring rights to this work. In addition, as of 2020-09-20, the editors have made this specification available under the Open Web Foundation Agreement Version 1.0.

Example

Here is a simple event example:

<div class="h-event">
  <h1 class="p-name">Microformats Meetup</h1>
  <p>From 
    <time class="dt-start" datetime="2013-06-30 12:00">30<sup>th</sup> June 2013, 12:00</time>
    to <time class="dt-end" datetime="2013-06-30 18:00">18:00</time>
    at <span class="p-location">Some bar in SF</span></p>
  <p class="p-summary">Get together and discuss all things microformats-related.</p>
</div>

Get started

The class h-event is a root class name that indicates the presence of an h-event.

p-name, dt-start, dt-end, p-location, p-summary, and the other h-event property class names listed below define properties of the h-event.

See microformats2 parsing specification to learn more about property class names.

Properties

h-event properties, inside an element with class h-event:

  • p-name - event name (or title)
  • p-summary - short summary of the event
  • dt-start - datetime the event starts
  • dt-end - datetime the event ends
  • dt-duration - duration of the event
  • p-description - more detailed description of the event
  • u-url - permalink for the event
  • p-category - event category(ies)/tag(s)
  • p-location - where the event takes place, optionally embedded h-card, h-adr, or h-geo
    Main article: h-adr
    Main article: h-card

Experimental properties currently in use in the wild but not (yet) part of the official h-entry spec:

  • p-attendee - a person attending the event, optionally embed h-card
    Main article: h-card

All properties are optional.

Status

h-event is a microformats.org draft specification. Public discussion on h-event takes place on h-event-feedback, the #microformats #microformats on freenode channel on irc.freenode.net, and microformats-new mailing list.

h-event is ready to use and implemented in the wild, but for backwards compatibility you should also mark h-events up as classic hCalendar 1.0 events.

Property Details

(stub, to be expanded)

p-location

p-location is typically a physical address, optionally marked up with h-adr, for example:

<p class="p-location h-adr">
  <span class="p-street-address">17 Austerstræti</span>
  <span class="p-locality">Reykjavík</span>
  <span class="p-country-name">Iceland</span>
</p>

Reserved Properties

Reserved properties:

  • p-organizer - a person (co-)organizing the event, optionally embed h-card
    Main article: h-card

Examples in the wild

Real world in the wild examples:

See microformats2 examples in the wild for more


Main article: microformats validators

Test and validate microformats2 markup in general with:


Backward Compatibility

Publisher Compatibility

For backward compatibility, you may wish to use classic hCalendar 1.0 classnames in addition to the more future-proof h-event properties, for example:

<div class="h-event vevent">
  <h1 class="p-name summary">Some great event</h1>
</div>
</div>

Parser Compatibility

Microformats parsers SHOULD detect the following root class name and property names. A microformats2 parser may use existing microformats Microformats Parsers to extract these properties. If an "h-event" is found, don't look for a "vevent" on the same element.

Compat root class name: vevent
Properties: (parsed as p- plain text unless otherwise specified)

  • summary - parse as p-name
  • dtstart - parse as dt-start
  • dtend - parse as dt-end
  • duration - parse as dt-duration
  • description
  • url - parse as u-
  • category
  • location - including compat root vcard in the absence of h-card, and compat root adr in the absence of h-adr
  • geo - parse as p-location h-geo including compat root geo

iCalendar Compatibility

hCalendar-specific implementations that perform custom display or translation to iCalendar .ics SHOULD prefer p-name over p-summary, and use p-summary value(s) as a fallback if there is no p-name.

Background

This work is based on the existing hCalendar 1.0 and iCalendar RFC 2445 specifications.

Design Principles

(stub, expand)

See Also