[html5] How to mark up FAQ

Gordon Baker gbakerled at outlook.com
Mon Mar 17 09:30:31 PDT 2014


Hi, I'm wondering what's the current best practice for marking up an FAQ. There seem to be 3 main alternatives:
<h1>Question</h1><p>Answer</p><h1>Question</h1><p>Answer</p>...
or
<dl>  <dt>Question</dt>  <dd>Answer</dd>  <dt>Question</dt>  <dd>Answer</dd>...</dl>
or
<details>  <summary>Question</summary>  <p>Answer</p></details><details>  <summary>Question</summary>  <p>Answer</p></details>...
The h1-p option would create an implicit section for each question and affect the document outline. Perhaps that would be a good thing if you wanted to create a TOC for the FAQ...
The association list (dl) seems like a reasonable option if you don't want to affect the document's outline. I'm not sure of any advantages/disadvantages of this markup, though.
The details-summary option seems nice if you want a "collapsed" FAQs, particularly for those who don't know how to program in JS, but IE and FF don't yet support this functionality AFAICT. Also not sure if FAQ was an intended use of details-summary, semantically.
I searched but couldn't find anything related to marking up FAQs in the spec, (including section 4.13).
Thanks 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/help-whatwg.org/attachments/20140317/e916400c/attachment-0002.htm>


More information about the Help mailing list