--- title: FAQ description: Learn how to implement Schema.org FAQ markup to improve your search appearance. --- Use `defineQuestion()` with `defineWebPage({ '@type': 'FAQPage' })` to mark up FAQ content. Google can display your questions and answers directly in search results as expandable rich snippets. ::note FAQ structured data enables rich results where users can see and expand your Q&A directly in Google search, increasing visibility and click-through rates. :: ## Useful Links - [defineQuestion](/docs/schema-org/api/schema/question) - [FAQ Page | Google Search Central](https://developers.google.com/search/docs/advanced/structured-data/faqpage) - [Question Schema | Yoast](https://developer.yoast.com/features/schema/pieces/question) ## How do I mark up FAQs? [defineQuestion](/docs/schema-org/api/schema/question) creates Question Schema whilst handling relations for you. Note: When using a page with the path `/faq`, the page type will be automatically set for you. Tips: - The answer may contain HTML content such as links and lists. ```ts import { defineQuestion, defineWebPage, useSchemaOrg } from '@unhead/schema-org/@framework' useSchemaOrg([ defineWebPage({ '@type': 'FAQPage', }), defineQuestion({ name: 'How long is a piece of string?', acceptedAnswer: 'The length of a piece of string is the number of characters in the string.', }), defineQuestion({ name: 'How big is a giraffe?', acceptedAnswer: 'A giraffe is 12 feet tall', }), ]) ``` ## How should I structure FAQ content in HTML? For the best user experience, it's good to structure your FAQ content in a way that matches your schema markup: ```html

Frequently Asked Questions

How long is a piece of string?

The length of a piece of string is the number of characters in the string.

How big is a giraffe?

A giraffe is 12 feet tall

What is quantum mechanics?

Quantum mechanics is the study of the nature of matter.

It is the study of the nature of the interaction between particles and the nature of the universe.

Particles are the smallest particles in the universe.

The universe is made up of particles.

Particles are made up of matter.

Matter is made up of energy.

``` ## Can I use HTML in FAQ answers? You can include HTML content in your answers to provide a richer experience: ```ts import { defineQuestion, defineWebPage, useSchemaOrg } from '@unhead/schema-org/@framework' useSchemaOrg([ defineWebPage({ '@type': 'FAQPage', }), defineQuestion({ name: 'What is quantum mechanics?', acceptedAnswer: `

Quantum mechanics is the study of the nature of matter.

It is the study of the nature of the interaction between particles and the nature of the universe.

Particles are the smallest particles in the universe.

The universe is made up of particles.

Particles are made up of matter.

Matter is made up of energy.

`, }), ]) ``` ## Related Recipes - [Setting Up Your Identity](/docs/schema-org/guides/recipes/identity) - Define your organization/person - [How-To Guide](/docs/schema-org/guides/recipes/how-to) - Step-by-step instructions