-
microformats introduction
Tantek
Çelik
Rose Tech Ventures Incubator • 2009-08-14
-
-
What are microformats?
-
microformats
-
building blocks: HTML & XHTML
- Use HTML 4 semantics, XHTML 1.0 syntax & structure
- Why not use XHTML 1.1?
- no benefit
- mime type requires draconian handling = fragile
- Why not use XHTML 2.0?
- W3C has ended the effort.
- Why use XHTML instead of HTML?
- well-formed XML = simple API for free
- better validation = catch errors sooner
-
building blocks: POSH
- POSH = Plain Old Semantic HTML
- a name for what we already do and want
- semantic, not presentational HTML tags/attributes
- semantic class names
- don't abuse semantic tags (e.g.
<table>
, <blockquote>
)
- use
<p>
instead of <br><br>
- use
<h1>
…<h6>
headings instead of <b>
& <font>
- avoid empty
<a name="…"></a>
anchors, use id="…"
- for more POSH tips see: microformats.org/wiki/posh
-
building blocks: why POSH?
- site information architecture (IA)
- easier to style with CSS
- accessibility - screen readers
- diverse device support - mobile
- search engine optimization
- avoid unindexed formats for text, e.g. Flash
- PDF cannot be trusted, degrades worse than HTML
- Cheatsheets, authored in Pages on Mac, output to PDF
- Looked fine on PC screen, printer printed gibberish
-
why microformats
- share meaning and data across sites and apps
- human readable - content and formats
- takes the guesswork out of marking up certain things
- stylable with CSS
- applications: user download/subscribe, search engines
- automatic API
- works now.
-
microformats and internationalization
- microformats use the ISO8601 standard for dates and times
- ISO8601 wasn't designed to be human readable
- ... but has become human readable over time
- 2003-02-01 more cross-culturally understandable than 03/02/01
- hCard microformat re-uses IETF standard vCard vocabulary
- e.g. given-name family-name (not first last)
- reuse intl standards/terms = more intl to start with
- lesson for terminology: reuse, don't reinvent
-
- Solve a specific problem
- Visible data better for humans than invisible metadata
- Reuse building blocks from widely adopted standards
- vCard: hCard
- iCalendar: hCalendar
- Atom: hAtom
- Start as simple as possible
- Pave the cow paths
- Humans first, machines second
- 80/20
-
microformats and you
- after (or while) POSHifying your site...
- include appropriate microformats
- about/contact page hCard - nearly every site
- user profiles hCards - every site with profiles
- anything episodic - hAtom entries - anything blog-like
- event listings in hCalendar - conferences, schedules
- user reviews in hReview
- media content in hMedia
-
-
Thanks!
-
Colophon