Structured data
Overview
Structured data is metadata that describes the content of a web page in a machine-readable format. HTML defines how a page looks, but it is hard for a machine to tell whether that page is a recipe, a product review, or a Q&A. By explicitly describing the meaning (semantics) of a page's content, structured data lets search engines and other programs understand the page's content accurately.
JSON-LD and Schema.org
Formats for writing structured data include JSON-LD (JSON for Linking Data), and Google recommends JSON-LD in many cases. In JSON-LD, you write the metadata in JSON format inside an HTML <script type="application/ld+json"> tag. Because it is separate from the HTML body, it has the advantage that you can add it without changing the existing page structure.
For the vocabulary, you use Schema.org. Schema.org is a vocabulary defined by an initiative founded by four companies, Google, Microsoft, Yahoo, and Yandex, and it defines types such as Article, QAPage, FAQPage, Product, and Recipe. Each type has required properties and recommended properties, and to show rich results in Google Search, you need to include all the required properties.
The effect on rich results
When structured data is implemented correctly, rich results (rich snippets) may appear in Google Search results. A normal search result has three lines: a title, a URL, and a description, but rich results show extra, visually prominent information such as star ratings, prices, FAQ accordions, and Q&A threads.
Rich results can lead to a higher click-through rate (CTR). This is because they take up more space on the search results page and are more likely to catch users' eyes. However, implementing structured data is a necessary condition for showing rich results, not a sufficient one. Whether Google shows rich results is decided by the quality of the page, its relevance to the search query, and other algorithmic factors.
Implementation in a question box service
This question box service uses several structured data types for different purposes. The public question pages (Community questions) use the QAPage type to describe the thread structure of questions and answers. Blog articles use the Article type to describe the author, publication date, and update date. The glossary uses the DefinedTermSet and DefinedTerm types to describe the definitions of terms.
This structured data is assembled when the page is generated, from the same data as the content that is displayed. It's good to check regularly for structured data errors and warnings in the rich results reports in Google Search Console.