I want to start adding more structured data to some sites. The problem is that pages are being composed of multiple pieces.
Google’s example has:
<html itemscope itemtype="https://schema.org/FAQPage">
But does this FAQPage-type need to be on the html-tag?
What if my page contains a FAQ-section within a default textpage?
Can I just place all the FAQ content within a div like this?
<div class="faq-container" itemscope itemtype="https://schema.org/FAQPage">
...
</div>
And if so, can I still have a Webpage-type on my <html>
tag?
2
Answers
I just tested it in the Rich Result Tester, and as I expected, the FAQPage does not have to be on the HTML element.
By setting the type
FAQPage
on anhtml
element, you are telling search engines and browsers that this entire HTML document is FAQ, including the meta content. This may make sense if the metadata has the appropriate content.Structured data must represent specific content. You can set the type
FAQPage
on the nearest element that opens the FAQ content container. This minimizes the extra source code inside the typeFAQPage
.