Say one has a simple question and answer HTML and would like to add microdata, how should one proceed?
<h2>My Question</h2>
<p>My Answer</p>
I am aware of the schema.org example, but I don't find it very clear. It looks like overkill. I need a simple solution. Can I proceed this way?
<h2 itemscope itemtype="http://schema.org/Question">My Question</h2>
<p itemscope itemtype="http://schema.org/Answer">My Answer</p>
I just want to tell what the question is and what the answer is. Is this enough for search engines? Or should I have something more sophisticated like:
<div itemscope itemtype="http://schema.org/Question">
<h2 itemprop="name">My Question</h2>
<p itemscope itemtype="http://schema.org/Answer">My Answer</p>
</div>
Is using itemprop="name"
the right way to tell what the question is? What is the difference between itemprop="name"
and itemprop="text"
in the schema.org example mentioned above?