1

I am adding Microdata to my site and would like to know if there is a problem with this markup:

<span class="createdate" itemprop="dateCreated"><i class="icon-calendar"></i> 7-15-2013</span>

Or should I use this:

<span class="createdate"><i class="icon-calendar"></i> <span itemprop="dateCreated">7-15-2013</span></span>

Basically, does Microdata markup must follow the text, and does it have a problem with an icon or span in front of the text?

unor
  • 92,415
  • 26
  • 211
  • 360
Benn
  • 4,840
  • 8
  • 65
  • 106

1 Answers1

2

The value will be the textContent of the span element with the itemprop.

So I guess both cases would be fine.

Side notes

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360
  • I am using span for icons , since many people here use , I just trow it in so that they would understand what is in the markup. Thhx for the info. And yes I moved to time element for those, but the question was "what if" there is additional markup – Benn Apr 08 '14 at 12:42
  • Testing markup here , gives you exact info and what you should do/not do google.com/webmasters/tools/richsnippet – Benn Apr 08 '14 at 12:43