HTML and CSS Reference
In-Depth Information
Microformats
A special approach to metadata is a set of simple open data formats called microformats (mF). They are highly
correlated with the Semantic Web by applying and reusing features of existing technologies (for example, the (X)
HTML rel attribute) and by introducing new ones with the simplest approaches possible—based on Plain Old
Semantic HTML ( POSH ) (for example, hCard). They can be applied not only in (X)HTML markup but also in XML,
RSS, Atom, and so on.
Microformats can express site structure, link weight, content type, and human relationships with the class , rel ,
and rev attribute values [27]. They are very easy to write, and the number of software supporting them is increasing
(for example, the Operator [28] and Tails Export [29] add-ons for Firefox, the Michromeformats Google Chrome
extension [30], the microformats transformer Optimus [31], or the Microformats Bookmarklet for Safari, Firefox,
and IE [32]).
However, there are still some open issues. For example, applying various microformats as multiple values on the
a element should be avoided (for example, rel="nofollow" and rel="friend" ). The rev attribute used by the Vote
Links microformat cannot be used in HTML5.
Profile URIs provided by the profile attribute cannot be used on the head element in HTML5, where the profile
attribute values can be declared for the rel attribute on anchors ( a ) or link elements ( link ). As an example, a profile
URI is presented for the hCalendar microformat with all the three options. The hCalendar microformat is based on
the iCalendar standard (RFC 2445 [33]). All contents that use hCalendar notation should refer to the hCalendar XMDP
profile, in other words, http://microformats.org/profile/hcalendar , as shown in Listing 7-7 or Listing 7-8 for the
document head or in Listing 7-9 as part of the document body. These methods can also be combined.
Listing 7-7. Providing the hCalendar Head Profile in the Document Head (Cannot Be Used in HTML5)
<head profile=" http://microformats.org/profile/hcalendar " >
Listing 7-8. Linking to the hCalendar Profile in the Document Head
<link rel="profile" href=" http://microformats.org/profile/hcalendar " >
Listing 7-9. Using the hCalendar Profile in the Document Body
<a rel="profile" href=" http://microformats.org/profile/hcalendar " >hCalendar</a>
New structural elements introduced by HTML5, such as article , nav , and section , are not recognized by certain
microformat parsers.
In the next sections, we will give you an overview of some of the most popular microformats, namely, hCalendar,
hCard, rel="license" , rel="nofollow" , rel="tag" , Vote Links, and XFN.
hCalendar
You can use the hCalendar microformat to create calendar entries for sport events, anniversaries, reminders,
meetings, workshops, conferences, and other events. The root class name for hCalendar is vcalendar . The root class
name for events is vevent , which is required for all event listings.
The properties are represented by the elements of hCalendar. The required properties are dtstart , which should
be provided in the ISO date format, 2 and summary .
2 Beyond microformats such as hAtom, hCalendar, hCard, and hReview, several web technologies apply the ISO 8601 date format
for date-time representation, such as XML, XML schema datatypes, RDF, and Atom.
 
Search WWH ::




Custom Search