[html5] How to mark up FAQ
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:
<dl> <dt>Question</dt> <dd>Answer</dd> <dt>Question</dt> <dd>Answer</dd>...</dl>
<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).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Help