h-event: Difference between revisions
m (→Properties: clarified coordinates) |
GlennJones (talk | contribs) (Issue: datetime without the 'T' delimiter between date and time) |
||
Line 13: | Line 13: | ||
<h1 class="p-name">Microformats Meetup</h1> | <h1 class="p-name">Microformats Meetup</h1> | ||
<p>From | <p>From | ||
<time class="dt-start" datetime="2013-06- | <time class="dt-start" datetime="2013-06-30t12:00">30<sup>th</sup> June 2013, 12:00</time> | ||
to <time class="dt-end" datetime="2013-06- | to <time class="dt-end" datetime="2013-06-30t18:00">18:00</time> | ||
at <span class="p-location">Some bar in SF</span></p> | at <span class="p-location">Some bar in SF</span></p> | ||
<p class="p-summary">Get together and discuss all things microformats-related.</p> | <p class="p-summary">Get together and discuss all things microformats-related.</p> |
Revision as of 10:11, 14 July 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.
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-30t12:00">30<sup>th</sup> June 2013, 12:00</time>
to <time class="dt-end" datetime="2013-06-30t18: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 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 eventdt-start
- datetime the event startsdt-end
- datetime the event endsdt-duration
- duration of the eventp-description
- more detailed description of the eventu-url
- permalink for the eventp-category
- event category(ies)/tag(s)p-location
- where the event takes place, optionally embedded h-adr or h-cardMain article: h-adrMain article: h-cardp-geo
- geophysical coordinates of the event, optionally embedded h-geoMain article: h-geop-latitude
- decimal latitudep-longitude
- decimal longitude
Experimental properties currently in use in the wild but not (yet) part of the official h-entry spec:
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 irc 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 events.
Property Details
(stub, to be expanded)
p-location
is typically a physical address, optionally marked up with h-adr, for example:
<p class="p-adr 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>
hCalendar-specific implementations that perform custom display or translation (e.g. 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
.
Reserved properties:
Examples in the wild
Real world in the wild examples:
- ... add uses of h-event you see in the wild here.
- W3Conf 2013 uses h-event for the main event, and h-card for all the speakers and notable attendees. The h-cards make particularly good use of implied name, url, and photo properties.
- Tantek Çelik uses h-event on his home page
- microformats.org at 7 years presentation with h-event
- Rise of the Indie Web hCards (from Personal Democracy Forum 2012 #pdf12 #pdf2012) has microformats2 h-event and h-card markup
- WebMaker by Mozilla has h-event and h-card on event search (e.g. search near Portland Oregon) and event pages (e.g. IndieWebCamp 2012).[1]
- IndieWebCamp has microformats2 h-event markup with embedded h-cards for the organizers and the location.
- Mozilla Events page has microformats2 h-event markup with attendees marked up with h-card.
See microformats2 examples in the wild for more
Test and validate microformats2 markup in general with:
- https://pin13.net/mf2/ - enter your markup directly
- https://pin13.net/ - enter a URL to a page to test where it says "Microformats Parser"
Backward Compatibility
Publisher Compatibility
For backward compatibility, you may wish to use classic hCalendar 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 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 asp-name
dtstart
- parse asdt-start
dtend
- parse asdt-end
duration
- parse asdt-duration
description
url
- parse as u-category
location
- including compat rootvcard
in the absence ofh-card
, and compat rootadr
in the absence ofh-adr
geo
- parse asp-geo h-geo
including compat rootgeo
latitude
longitude
Background
This work is based on the existing hCalendar and iCalendar specifications.
Design Principles
(stub, expand)