Quantcast
Viewing latest article 23
Browse Latest Browse All 24

Answer by Matthias Pfefferle for Social media profiles in h-card HTML microformats

There is a note on the microformats2 site at the microformats wiki:

Note: use of 'value' within 'tel' should be automatically handled by the support of the value-class-pattern. And for now, the 'type' subproperty of 'tel' is dropped/ignored. If there is demonstrable documented need for additional tel types (e.g. fax), we can introduce new flat properties as needed (e.g. p-gel-fax).

That means that the value-class-pattern is not yet supported by the mf2 spec, but you can try the vendor prefixes and use for example u-x-twitter u-url instead of u-url.

This for example:

<div class="h-card"><a href="http://twitter.com/blabla" class="u-x-twitter u-url">Twitter</a></div>

would be interpreted like:

{"items": [        {"type": ["h-card"            ],"properties": {"x-twitter": ["http:\/\/twitter.com\/blabla"                ],"url": ["http:\/\/twitter.com\/blabla"                ],"name": ["Twitter"                ]            }        }    ],"rels": {}}

BTW: You can try/validate your code here: http://pin13.net


Viewing latest article 23
Browse Latest Browse All 24

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>