Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

So I'm trying to mark up some microdata using a combination of the contact vcard microformat and the microdata format for places from:


I'd love to do both at once, but I have a problem that I don't know whether microdata schemas require exact duplication of html, or whether they're entirely reliant on the attributes that they suggest. Does anyone familiar with using microdata know whether the structure of the html is important to the schema?

Here is my current html attempt just as an example if it helps ??clarify?? (with php variables escaped out into the html):

<div id='contact'>
  <h4 class='title' style='text-align:center;margin-top:1em'>Main Contact Info</h4>
  <div style='margin:0 1em;border:1px solid grey;padding:1em;width:45%' id="hcard-Sherman-Brothers" class="vcard" itemscope itemtype="http://schema.org/LocalBusiness">
         <div class="org" itemprop="name">
            ShermanBrothers in <?php h($row_rsLocation['City']);?>
         <address class="adr" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress" style='display:block'>
          <div itemprop="streetAddress" class="street-address">
          <?php echo $row_rsLocation['Address1'];
          if (!empty($row_rsLocation['Address2'])) {
                    echo '<br>'.$row_rsLocation['Address2'];

          <span class="locality" itemprop="addressLocality"><?php h($row_rsLocation['City']);?></span>, 
          <span class="region" itemprop="addressRegion"><?php h($row_rsLocation['State']);?></span>, 
          <span class="postal-code"><?php h($row_rsLocation['ZipCode']);?></span>

          <span class="country-name">USA</span>

         <a itemprop="telephone" href='tel:<?php h($row_rsLocation['Phone']);?>' class="tel"><?php h($row_rsLocation['Phone']);?></a>
      </div><!-- End of vcard class -->
    </div><!-- End of contact div -->
share|improve this question

3 Answers 3

up vote 3 down vote accepted

No, you don't need to duplicate the HTML exactly: microdata schemas are based on the microdata attributes. It doesn't matter (usually; e.g. links are an exception) what HTML tag those attributes are applied to.

You may want to start by reading "Getting started with schema.org", if you haven't already.

share|improve this answer

You can also check your microdata format against Google Webmaster Tools, rich snippet testing tool at http://www.google.com/webmasters/tools/richsnippets

share|improve this answer

Yup, they need exact duplication as mentioned in http://schema.org/Place. It is fine if you've other html representation of the same data on the same page, but you need exact duplication of HTML as mentioned in http://schema.org/Place.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.