These are the rules that decide whether markup is read the way you intended — and they are where most hCard implementations go wrong.
Combining classes
hCard classes may be combined with ordinary CSS classes freely, on the root and on properties alike. Two restrictions:
- A
vcardroot element must not carry another hCard class. - Do not nest properties. A
telinside anadrmay be processed incorrectly. The exception is nesting the standard explicitly allows:country-name,region,locality,street-address,extended-addressandpostal-codeinsideadr;latitudeandlongitudeinsidegeo.
The nesting rule is easy to break by accident, because the visual layout of a contact block often puts the phone number inside the address paragraph.
How values are extracted
Normally the value is the visible text inside the element. Two exceptions carry the whole practical technique:
<abbr>withtitle— the value is the attribute, not the text.<abbr class="tel" title="+7 (890) 123-45-67">123-45-67</abbr>shows a local number and publishes the full one.<a>withhreffor URL-valued properties —url,email,logo,photo— where the value is the link target.
The alternative to markup entirely
Yandex states that submitting contact information through Site geography → Addresses and organisations in the console is equivalent to marking up the pages: the data goes to Yandex Business and appears across Yandex services either way. Two doors, one database.
Choosing between them
Markup keeps the site as the single source of truth and updates automatically when the page changes. The form gives faster updates and visible moderation status. For a business whose details rarely change, the form is less work; for a branch network that changes often, the markup pays for itself.
Cómo lo aplicamos
The nesting restriction is the one we check first on an existing implementation, because a phone number inside an address block is exactly how a designer would lay it out and exactly what Yandex warns against. The abbr-with-title trick is worth knowing beyond hCard: it is the clean way to publish a canonical machine value while showing a friendlier one to readers.
Servicios relacionados