hCard microformat Validator (beta, of course)

This is an unofficial validator¹/conformance checker of the hCard microformat.

Po polsku
(translations welcome!)

Input

URL

Check entire XHTML or HTML page by entering its HTTP URL.

Fragment

Paste well-formed XHTML fragment or complete document containing hCard.

Upload

Upload HTML or XHTML file to validate it. For this to work your browser must be setting MIME types properly.

Example

If searching for hCards in the wild is tiring, check one of the test-cases:

Browse examples

API & Other

Any page by Referer

<a href="http://hcard.geekhood.net/referrer/">Validate hCards</a>

Bookmarklet

hCard?

RESTful JSON API

Send GET request to http://hcard.geekhood.net/?url=URL to validate&output=json.

Output will be roughly compatible with the Validator.nu JSON API. Likely to change in the future.

Please use this API for validation, not just as an converter/extraction tool.


Send Feedback

You can send feedback via e-mail or the form below.

If you're reporting a bug or have a suggestion, don't forget to include example hCard code.

Result

Congratulations! No errors found.

  1. No issues found.

    Formatted name
    Dmitry Roslyakov
    URL
    Name Given Name
    Dmitry
    Family Name
    Roslyakov

File source

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<head profile="http://www.w3.org/2006/03/hcard">
	<title>Dmitry Roslyakov</title>
	<link rel="meta" type="application/rdf+xml" title="FOAF" href="/foaf.rdf" />
	<link rel="alternate" type="application/rdf+xml" title="Profile (RDF)" href="/foaf.rdf" />
	<link type="text/css" rel="stylesheet" href="floatbox/floatbox.css" />
	<link type="text/css" rel="stylesheet" href="profile.css" />
	<script type="text/javascript" src="floatbox/floatbox.js"></script>
</head>
<body class="vcard" about="http://roslyakov.com/me">
<div style="float:right"><a href="admin/"><img src="admin.png" alt="Click here to edit this profile" style="border: 0px"/></a></div>
<div id="personuri">Person URI: http://roslyakov.com/me</div>
<h1><span class="fn" property="foaf:name" xml:lang="en">Dmitry Roslyakov</span> <a rel="rdfs:seeAlso" href="/foaf.rdf" title="My FOAF document"><img src="foaf.png" alt="FOAF" style="border: 0px"/></a></h1>
<h2>Homepages</h2>
<div id="homepages"><ul><li rel="foaf:homepage"><a class="url" rel="me" about="http://roslyakov.com/" property="dc:title" href="http://roslyakov.com/" xml:lang="en">Homepage</a></li>
	</ul></div>
<h2>Blogs</h2>
<div id="blogs"><ul><li rel="foaf:weblog"><a class="url" rel="me" about="http://blogit.ru/" property="dc:title" href="http://blogit.ru/" xml:lang="en">Blog</a></li>
	</ul></div>
<h2>People</h2>
<div id="people"><ul>
<li rel="foaf:knows" resource="http://www.sergeychernyshev.com/sergey">
<span rel="foaf:homepage" resource="http://www.sergeychernyshev.com/"/><a rel="contact" href="http://www.sergeychernyshev.com/"><span property="foaf:name" xml:lang="en" about="http://www.sergeychernyshev.com/sergey">Sergey Chernyshev</span></a> <a href="http://www.sergeychernyshev.com/sergey" title="FOAF"><img src="foaf.png" alt="FOAF" style="border: 0px"/></a></li></ul></div>
<div style="border-top: 1px solid silver; padding: 5px; align: center; margin-top: 20px">
<a href="http://validator.w3.org/check?uri=http%3A%2F%2Froslyakov.com%2Fprofile%2F%3F" title="Check XHTML + RDFa validity"><img src="http://www.w3.org/Icons/valid-xhtml-rdfa-blue" alt="Valid XHTML + RDFa" style="margin: 0px 5px 0px 5px; border: 0px"/></a>
<a href="http://www.w3.org/2007/08/pyRdfa/extract?uri=http%3A%2F%2Froslyakov.com%2Fprofile%2F%3F" title="Extract RDF from RDFa on this page"><img src="http://www.w3.org/Icons/SW/Buttons/sw-rdfa-orange.png" alt="Extract RDF from RDFa on this page" style="margin: 0px 5px 0px 5px; border: 0px"/></a>
<a href="http://hcard.geekhood.net/?url=http%3A%2F%2Froslyakov.com%2Fprofile%2F%3F" title="Show hCard information on this page"><img src="hcard.png" alt="Show hCard information on this page" style="margin: 0px 5px 0px 5px; border: 0px"/></a>
<a href="http://gmpg.org/xfn/" title="XFN Homepage"><img src="xfn-btn.gif" alt="XFN" style="margin: 0px 5px 0px 5px; border: 0px"/></a>
<a href="http://microformats.org/wiki/geo" title="Geo Microformat Page"><img src="geo.png" alt="geo" style="margin: 0px 5px 0px 5px; border: 0px"/></a>
</div>
<div style="border-top: 1px solid silver; padding: 5px; align: center; font-size: small; text-align: center">Powered by <a href="http://code.google.com/p/my-semantic-profile/">My Semantic Profile</a> (v.0.4.1 r97)</div>
</body>
</html>

Parsed source

<html xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
  <head profile="http://www.w3.org/2006/03/hcard">
    <title>Dmitry Roslyakov</title>
    <link rel="meta" type="application/rdf+xml" title="FOAF" href="/foaf.rdf"/>
    <link rel="alternate" type="application/rdf+xml" title="Profile (RDF)" href="/foaf.rdf"/>
    <link type="text/css" rel="stylesheet" href="floatbox/floatbox.css"/>
    <link type="text/css" rel="stylesheet" href="profile.css"/>
    <script type="text/javascript" src="floatbox/floatbox.js"/>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <!-- meta inserted by hCard Validator -->
  </head>
  <body class="vcard" about="http://roslyakov.com/me">
<div style="float:right"><a href="admin/"><img src="admin.png" alt="Click here to edit this profile" style="border: 0px"/></a></div>
<div id="personuri">Person URI: http://roslyakov.com/me</div>
<h1><span class="fn" property="foaf:name" xml:lang="en">Dmitry Roslyakov</span> <a rel="rdfs:seeAlso" href="/foaf.rdf" title="My FOAF document"><img src="foaf.png" alt="FOAF" style="border: 0px"/></a></h1>
<h2>Homepages</h2>
<div id="homepages"><ul><li rel="foaf:homepage"><a class="url" rel="me" about="http://roslyakov.com/" property="dc:title" href="http://roslyakov.com/" xml:lang="en">Homepage</a></li>
	</ul></div>
<h2>Blogs</h2>
<div id="blogs"><ul><li rel="foaf:weblog"><a class="url" rel="me" about="http://blogit.ru/" property="dc:title" href="http://blogit.ru/" xml:lang="en">Blog</a></li>
	</ul></div>
<h2>People</h2>
<div id="people"><ul><li rel="foaf:knows" resource="http://www.sergeychernyshev.com/sergey">
<span rel="foaf:homepage" resource="http://www.sergeychernyshev.com/"/><a rel="contact" href="http://www.sergeychernyshev.com/"><span property="foaf:name" xml:lang="en" about="http://www.sergeychernyshev.com/sergey">Sergey Chernyshev</span></a> <a href="http://www.sergeychernyshev.com/sergey" title="FOAF"><img src="foaf.png" alt="FOAF" style="border: 0px"/></a></li></ul></div>
<div style="border-top: 1px solid silver; padding: 5px; align: center; margin-top: 20px">
<a href="http://validator.w3.org/check?uri=http%3A%2F%2Froslyakov.com%2Fprofile%2F%3F" title="Check XHTML + RDFa validity"><img src="http://www.w3.org/Icons/valid-xhtml-rdfa-blue" alt="Valid XHTML + RDFa" style="margin: 0px 5px 0px 5px; border: 0px"/></a>
<a href="http://www.w3.org/2007/08/pyRdfa/extract?uri=http%3A%2F%2Froslyakov.com%2Fprofile%2F%3F" title="Extract RDF from RDFa on this page"><img src="http://www.w3.org/Icons/SW/Buttons/sw-rdfa-orange.png" alt="Extract RDF from RDFa on this page" style="margin: 0px 5px 0px 5px; border: 0px"/></a>
<a href="http://hcard.geekhood.net/?url=http%3A%2F%2Froslyakov.com%2Fprofile%2F%3F" title="Show hCard information on this page"><img src="hcard.png" alt="Show hCard information on this page" style="margin: 0px 5px 0px 5px; border: 0px"/></a>
<a href="http://gmpg.org/xfn/" title="XFN Homepage"><img src="xfn-btn.gif" alt="XFN" style="margin: 0px 5px 0px 5px; border: 0px"/></a>
<a href="http://microformats.org/wiki/geo" title="Geo Microformat Page"><img src="geo.png" alt="geo" style="margin: 0px 5px 0px 5px; border: 0px"/></a>
</div>
<div style="border-top: 1px solid silver; padding: 5px; align: center; font-size: small; text-align: center">Powered by <a href="http://code.google.com/p/my-semantic-profile/">My Semantic Profile</a> (v.0.4.1 r97)</div>
</body>
</html>

Credits

Written by . Icons are from Tango Icon Library. Test cases include hCard Acid test by Dmitry Baranovskiy, examples from microformats.org and hCard test suite.

Source code is available under the BSD license.


¹ It's not a validator in the XML/SGML sense.