Jump to content

Template:FAQ: Difference between revisions

From Prisonpedia
Add Schema.org FAQ markup for SEO
Creating FAQ entry template
 
Line 1: Line 1:
<div class="faq-item" itemscope itemtype="https://schema.org/Question">
<noinclude>
<div style="margin: 10px 0; padding: 12px 15px; border-left: 4px solid #36c; background: #f8f9fa;">
This template creates a single FAQ entry.
<div itemprop="name" style="font-weight: bold; color: #202122; margin-bottom: 8px;">{{{question|{{{1|Question not provided}}}}}}</div>
 
<div itemscope itemtype="https://schema.org/Answer" itemprop="acceptedAnswer">
'''Usage:'''
<div itemprop="text" style="color: #333; line-height: 1.5;">{{{answer|{{{2|Answer not provided}}}}}}</div>
<pre>{{FAQ|question=Your question here?|answer=Your answer here.}}</pre>
</div>
 
</div>
</div><noinclude>
[[Category:Templates]]
[[Category:Templates]]
== Usage ==
</noinclude><includeonly>
This template creates an FAQ item with Schema.org markup for SEO. Google may display these as rich results.
'''Q: {{{question}}}'''
 
{{{answer}}}


<pre>
</includeonly>
{{FAQ
|question = What is the question?
|answer = This is the answer to the question.
}}
</pre>
</noinclude>

Latest revision as of 15:55, 3 December 2025

This template creates a single FAQ entry.

Usage:

{{FAQ|question=Your question here?|answer=Your answer here.}}