Skip to content

Instantly share code, notes, and snippets.

@pfulton
Created October 3, 2012 15:58
Show Gist options
  • Save pfulton/3827778 to your computer and use it in GitHub Desktop.
Save pfulton/3827778 to your computer and use it in GitHub Desktop.
Microformat & Microdata Markup for Address in Haml
-# Because I always forget...
-# Example markup for contact info (client's address) in Haml with both Microformats & Microdata
%article.vcard{:itemscope => true, :itemtype => 'http://schema.org/Organization'}
%h1.fn.org{:itemprop => 'name'} Company Name
%div.adr{:itemprop => 'address', :itemscope => true, :itemtype => 'http://schema.org/PostalAddress'}
%span.street-address{:itemprop => 'streetAddress'}
%span.locality{:itemprop => 'addressLocality'}
%span.region{:itemprop => 'addressRegion'}
%span.postal-code{:itemprop => 'postalCode'}
%span.tel{:itemprop => 'telephone'}
= link_to('Email', "mailto:#{}", :class => 'email', :itemprop => 'email')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment