Using semantic class names versus using Microdata

I tried my best to use only semantic class names, but my recent foray into microdata and SEO made me wonder if it makes sense to do both. Consider these two HTML snippets representing the event:

With CSS classes:

<div class="event" itemscope itemtype="http://schema.org/Event">
  <h3 itemprop="name">Spinal Tap</h3>
  <div  class="description" itemprop="description">One of the loudest bands ever
  reunites for an unforgettable two-day show.</div>
  Event date:
  <time itemprop="startDate" datetime="2011-05-08T19:30">May 8, 7:30pm</time>
</div>

Without CSS classes:

<div itemscope itemtype="http://schema.org/Event">
  <h3 itemprop="name">Spinal Tap</h3>
  <div itemprop="description">One of the loudest bands ever
  reunites for an unforgettable two-day show.</div>
  Event date:
  <time itemprop="startDate" datetime="2011-05-08T19:30">May 8, 7:30pm</time>
</div>

Both represent the same content, and both are easily styled. I could just use an attribute selector to apply styles to one without any type of classes being applied to it, except possibly applying some extra class (in this example, maybe something like β€œupcoming” or β€œ of the past" ).

, , - , , ​​? , , - Javascript, , .

+4
1

, - ", ". - ", Volkswagen". , - , "", .

, , .

, , . node, , .

0

All Articles