Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I’m trying to mark up some structured data using a combination of the contact vCard Microformat and Microdata using Schema.org’s Place type.

I’d love to do both at once, but I have a problem that I don’t know whether the Schema.org Microdata examples 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
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.