To start let's have a look at the schema.org class type: Question. The only required properties for questions are text and name. There are 5 recommended properties: URL, suggested answer, accepted answer, publisher, and about. About is a great property, because you can use a Wikipedia reference to define the topic explicitly.
Finally, there are 3 useful other properties that I will highlight: is part of, description, and upvote count. Please note that you do not have to use every property listed in Schema App (we show all the properties possible in the schema.org vocabulary for the Question class). That said Google's Gary Illyes stated at Pubcon 2017 that we should:
"think about any schema.org schema that you could use on your pages."
So let's look at doing a thorough job, shall we?
Question Schema Markup Properties Explained
- text - The actual text of the question itself.
- name - Choose an identifier to name the data item. Using the actual question is a good idea, just to keep things simple.
- Url - The URL for where the question lives on the page.
- suggestedAnswer - This property is expecting you to create an Answer data item. Best to use suggestedAnswer when there are many possible answers. The documentation indicates they don’t have to be relevant or accurate answers. Think of answers on a question/answer web page like Yahoo Answers.
- acceptedAnswer - This property is expecting you to create an Answer data item. It is best to use acceptedAnswer for the best answer to a question. This can be the only answer or it could be one among many other answers. It just needs to be the best answer. If the question is in a forum, then use the one with the most positive votes. If it is a list of answers, choose the best from the list.
- publisher - This property is expecting an Organization or Person data item. Usually, it is the organization that owns the domain the question/answer content is found on. Note, that all types of organization markup can be used here, such as LocalBusiness, MedicalOrganization, etc.
- about - This property is expecting a Thing data item, which describes what the questions are about. If you’re creating markup for a business FAQ page, then they would be about your business. Use a Wikipedia lookup if the question is about a topic described there. If it is about a service or product you offer, reference the service/product page.
- isPartOf - This property is expecting a CreativeWork data item and it is our opportunity to tie all our questions together. The property isPartOf indicates that the question is part of some other creative work. In most cases, you will want to use the QAPage class type.
- description - This property describes the question. If the question has a group heading then this may be an appropriate place to call out what that heading is.
- upvoteCount - If this question has an upvote count then this would be the property to indicate that. This property is expecting an Integer data item
Accepted Answer & Answer Schema Markup Properties Explained
Note, that the accepted answer above is a link. That's because we are linking to a new data item, or entity, that details out the Answer. The schema.org class type Answer is very similar properties to Question. It has the same two required properties, text and name. There are no recommended properties for Answer, but we will still want to use many of the same properties that we did for Question. Again, not all the properties are necessary. Use them when they are applicable.
- text - The actual text of the answer itself.
- name - Choose an identifier to name the data item. Using the actual answer text is a good idea, just to keep things simple.
- Url - The URL for where the answer lives on the page.
- about - This property is expecting a Thing data item, which describes what the answers are about. If you’re creating markup for a business FAQ page, then they would be about your business. Use a Wikipedia lookup if the question is about a topic described there. If it is about a service or product you offer, reference the service/product page.
- publisher - This property is expecting an Organization or Person data item. Usually it is the organization that owns the domain the content is found on, like an FAQ answer. Sometimes it is a person who is writing on your page, like a response in a forum or a guest blogger.
- isPartOf - This property is expecting a CreativeWork data item and it is our opportunity to tie all our answers together. The property isPartOf indicates that the answer is part of some other creative work. In most cases you will want to use the QAPage class type.
- description - This property describes the answer. If the answer is from a group that has a heading then this may be an appropriate place to call out what that heading is.
- upvoteCount - If this answer has an upvote count then this would be the place to indicate that. This property is expecting an Integer data item.
Step by Step Video for Question and Answer Schema Markup
In order to understand how to create the markup in practice, watch this short video, where Martha van Berkel steps you through Question and Answer Schema Markup in Schema App.
That's how you do it! The acceptedAnswer schema markup property is the key to Google's undocumented feature to highlight the best answer. Use Schema App to create the markup quickly, with no errors, without being a developer.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article