Phone Number: 800-288-3875

Phone Number: 800-288-3875

Phone Number: 800-288-3875

do hCard property elements have to be children or can they be descendants?

50 Views Asked by At

Basically I'm wondering if this is still effective as an hcard.

<div class="vcard">
<h2>Phone Number: <span class="tel">800-288-3875</span></h2>
</div>

Thanks!

1

There are 1 best solutions below

0
georgebrock On BEST ANSWER

hCard properties don't need to be direct descendants, they can be nested several layers deep (as in your example, and many of the examples on the Microformats wiki, e.g. see the hCard authoring tips page).

However, the hCard in your example is incomplete because it lacks some of the required properties, so some parsers might not recognise it.