Skip to content

Instantly share code, notes, and snippets.

@m93a
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m93a/9b7513f5c3782ce24c07 to your computer and use it in GitHub Desktop.
Save m93a/9b7513f5c3782ce24c07 to your computer and use it in GitHub Desktop.
HTML6 microformats - semantic web gets even better
<!--
-
- Vote for this idea on http://hlasov.at/lg0i
-
-->
<!-- html5 with microformats -->
<!doctype html>
<html>
<head></head>
<body>
<div class=h-card>
<img class=u-photo src="http://i.imgur.com/VWEqOzV.jpg"/>
<span class=p-nickname>m93a</span>
<a class=u-url href="http://m93a.g6.cz">Website</a>
</div>
</body>
</html>
<!-- html6 with microformats -->
<!doctype foo-gaem>
<html:html>
<html:head>
<!-- define rules for the whole document -->
<html:mf class=h-card tag=person />
<html:mf class=u-photo tag=person attr=avatar />
<html:mf class=p-nickname tag=name />
<html:mf class=u-url tag=web />
</html:head>
<html:body>
<!-- use the human-readable form -->
<person avatar="http://i.imgur.com/VWEqOzV.jpg">
<name>m93a</name>
<web>http://m93a.g6.cz</web>
</person>
</html:body>
</html:html>
<!-- And because you've been a good boy, you can include even external microformats -->
<html:mf src=./foo.mf />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment