Q&A Page

Q&A Pages are web pages that contain data in a question and answer format, which is one question followed by zero or more answers to the question. For content that represents a question and its answers, you can mark up your data with the schema.org QAPage, Question, and Answer types.

Properly marked up pages are eligible to have a rich result displayed on the search results page. This rich treatment helps your site reach the right users on Search. Here's an example of a result you might see for the user query “How do I remove a cable that is stuck in a USB port?" if the page has been marked up to answer that question:

An example in search results
  of a question and answer card for the search query "How do I remove a cable that is stuck in
  a USB port?"

In addition to enabling your content for the rich result treatment shown above, marking up your Q&A page helps Google generate a better snippet for your page. In the example above, the content from the answers may appear in the basic result if the rich result is not shown.

Keep in mind the actual appearance might be different. To see the most up-to-date layout of basic results and rich results in a search results page, search on google.com.

Examples

The following markup example includes the QAPage, Question, and Answer type definitions in JSON-LD:

The following markup example includes the QAPage, Question, and Answer type definitions in Microdata:

Guidelines

For your Q&A page to be eligible for this rich treatment, you must follow these guidelines:

Content guidelines

  • Only use the QAPage markup if your page has information in a question and answer format, which is one question followed by zero or more answers.
  • Don't use QAPage markup for FAQ pages or pages where there are multiple questions per page. QAPage markup is for pages where the focus of the page is a single question and its answers.
  • Don’t use QAPage markup for advertising purposes.
  • Make sure each Question includes the entire text of the question and make sure each Answer includes the entire text of the answer.
  • Answer markup is for answers to the question, not for comments on the question or comments on other answers. Do not markup non-answer comments as an Answer.
  • Question and answer content may not be displayed as a rich result if it contains any of the following types of content: obscene, profane, sexually explicit, graphically violent, promotion of dangerous or illegal activities, or hateful or harassing language.

Structured data type definitions

This section describes the structured data types related to QAPage.

You must include the required properties for your content to be eligible for display as a rich result. You can also include the recommended properties to add more information to your structured data, which could provide a better user experience.

You can use Google’s Structured Data Testing Tool to validate and preview your structured data.

QAPage

The full definition of QAPage is provided on schema.org. The QAPage type indicates that the page is focused on a specific question and its answer(s). We will only use Question structured data from pages with QAPage markup. There should only be one QAPage type definition per page.

The following table describes the properties of the QAPage type that are used by Google Search.

Required properties
mainEntity Question

The Question for this page must be nested under the mainEntity property of the QAPage item.

Question

The Question type defines the question that this page answers, and includes the answers, if any, to that question. Exactly one Question type is expected on the page, nested under the mainEntity property of the schema.org/QAPage. There should only be one Question type definition per page.

The full definition of Question is provided on schema.org.

Required properties
name Text

The full text of the short form of the question. For example, "How many teaspoons in a cup?".

Either acceptedAnswer or suggestedAnswer Answer

A Question must have at least one Answer – either an acceptedAnswer or a suggestedAnswer.

Recommended properties
acceptedAnswer Answer

A top answer to the question. There can be zero or more of these per question. This should represent answers that are accepted in some way on your site. For example, accepted as a top answer by question asker, a moderator, or a voting system. Other forms of sorting answers, such as most-recent, should not be used to identify top answers.

answerCount Integer

The total number of answers to the question. For example, if there are 15 answers, but only the first 10 are marked up due to pagination, this value would be 15.

author Person or Organization

The author of the question.

dateCreated Date or DateTime

The date at which the question was added to the page, in ISO-8601 format.

suggestedAnswer Answer

One possible answer, but not accepted as a top answer (acceptedAnswer). There can be zero or more of these per Question.

text Text

The full text of the long form of the question. For example, "I’m cooking, and I need to know how many teaspoons are in a cup. How many teaspoons are in 1 cup?"

upvoteCount Integer

The total number of votes that this question has received. If the page supports upvotes and downvotes, then set the upvoteCount value to a single aggregate value that represents both upvotes and downvotes. For example, if there are 5 upvotes and 2 downvotes, the aggregate value used for upvoteCount is 3. If there are 5 upvotes and downvotes are not supported, then the value for upvoteCount is 5.

Answer

The Answer type defines the suggested and accepted answers to the Question on this page. Define Answers inside the Question, as values for the suggestedAnswer and acceptedAnswer properties.

The following table describes the properties of the Answer type that is used within a Question.

The full definition of Answer is provided on schema.org.

Required properties
text Text

The full text of the answer. If only a portion is marked up, your content may not be shown and Google cannot determine the best text to display.

Recommended properties
author Person or Organization

The author of the answer.

dateCreated Date or DateTime

The date at which the answer was added to the page, in ISO-8601 format.

downvoteCount Integer

The number of downvotes this answer has received. For example, 5.

upvoteCount Integer

The number of upvotes that this answer has received. For example, 5.

url URL

A URL that links directly to this answer. For example: https://www.examplesite.com/question#answer1

Send feedback about...