hCard microformat Validator (beta, of course)

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

Po polsku En français
(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

This document contains errors.

File source

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>snemelk.ch</title>
    <meta content="NOW" name="expires">
    <meta content="index, follow, all" name="GOOGLEBOT">
    <meta content="index, follow, all" name="robots">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
    <style>
        html, body, #partner, iframe
        {
            height:         100%;
            width:          100%;
            margin:         0;
            padding:        0;
            border:         0;
            outline:        0;
            font-size:      100%;
            vertical-align: baseline;
            background:     transparent;
        }

        body
        {
            overflow: hidden;
        }
    </style>
</head>
<body>

<div id="partner"></div>

<script>
    document.write(
        '<script src="\/\/sedoparking.com/frmpark/snemelk.ch/sedopark/park.js">' +
        '<\/script>'
    );
</script>
</body>
</html>

Parsed source

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
  <head>
    <meta charset="utf-8"/>
    <title>snemelk.ch</title>
    <meta content="NOW" name="expires"/>
    <meta content="index, follow, all" name="GOOGLEBOT"/>
    <meta content="index, follow, all" name="robots"/>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>
    <style>
        html, body, #partner, iframe
        {
            height:         100%;
            width:          100%;
            margin:         0;
            padding:        0;
            border:         0;
            outline:        0;
            font-size:      100%;
            vertical-align: baseline;
            background:     transparent;
        }

        body
        {
            overflow: hidden;
        }
    </style>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <!-- meta inserted by hCard Validator -->
  </head>
  <body>

<div id="partner"/>

<script>
    document.write(
        '&lt;script src="\/\/sedoparking.com/frmpark/snemelk.ch/sedopark/park.js"&gt;' +
        '&lt;\/script&gt;'
    );
</script></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.