240 likes | 413 Views
Microformats. Embedding Semantics in XHTML. Microformats Defined. Microformats are small patterns of (X)HTML to represent commonly published things like people, events, blog posts, reviews and tags in web pages. Microformats Rely on POSH. Microformats rely on POSH (Plain Old Semantic HTML).
E N D
Microformats Embedding Semantics in XHTML Using Microformats
Microformats Defined Microformats are small patterns of (X)HTML to represent commonly published things like people, events, blog posts, reviews and tags in web pages. Using Microformats
Microformats Rely on POSH Microformats rely on POSH (Plain Old Semantic HTML). • We all know that (X)HTML is for structure & semantics, not style. • Semantics are meaning. • Adding standard classes to an (X)HTML document we can augment the semantics and store further information. Using Microformats
How are they consumed? Microformats are currently consumed in several ways (not a comprehensive list): • By web users • By spiders • By web services Using Microformats
Web Users Web users consume Microformats info through specialty tools such as the Firefox Operate extension. This extension allows users to: • Add hCard & hCalendar info to Outlook. • Add hCard & hCalendar info to Yahoo & Google • Find Microformat addresses on Google Maps Using Microformats
Web Spiders Web spider or web crawlers already pick up useful information such as email addresses. In the near future look for spiders to pick up hCard, vCard and other Microformat information which they will compile for use with Web Services. Using Microformats
Web Services Web services are applications that collect and process information then distribute that information to end users. Examples: • Stock quotes • Events collection • Contact info collection Using Microformats
Two Common Microformats Two common Microformats: • hCard: is an HTML vCard which contains contact information. • hCalendar: capable of storing event information. Using Microformats
hCard Uses the following classes (to name a few): • vcard: this is the root class • url: a web address • fn: first name • org: organization • adr: an address wrapper with the following: • street-address: street # and name • locality: city • region: state • postal-code: zip • tel: telephone # Using Microformats
hCard Example Using Microformats
hCard Example Code (1) Using Microformats
hCard Example Code (2) Using Microformats
hCard Example Code (3) Using Microformats
hCard Example Code (4) Using Microformats
hCard Example Code (5) Using Microformats
hCard Example Code (6) Next, you can create the CSS classes: N Using Microformats
hCalendar Uses the following classes (to name a few): • vevent: this is the root class • dtstart & dtend: event start & end times • summary: the name of the event • location: the location of the event • description: event details Using Microformats
hCalendar Example Using Microformats
hCalendar Example Code (1) Using Microformats
hCalendar Example Code (2) Using Microformats
hCalendar Example Code (3) Using Microformats
hCalendar Example Code (4) Using Microformats
hCalendar Example Code (5) Using Microformats
hCalendar Example Code (6) Using Microformats