[html5] How to mark up FAQ

Brian Tremblay webmaster at tsmchughs.com
Mon Mar 17 14:06:10 PDT 2014


On 3/17/14, 12:00 PM, Gordon Baker wrote:
>
> I thought <hx>, 2 <= x <= 6 was now discouraged in favor of the
> explicit <section>s

No, <h2> <h3> etc are not discouraged. The spec does say to avoid 
/mixing/ the two approaches. That is, either use <h1>, <h2>, <h3>, etc., 
in nested sections or not; or use nested sections with <h1> only. This 
helps keep your outline clear.

> <h1>FAQ</h1>
> <section>
>   <h1>Question></h1>
>   <p>Answer</p>
> </section>
> <section>
>   <h1>Question></h1>
>   <p>Answer</p>
> </section>
> ...

That's perfectly reasonable, and the approach I use, in part because it 
makes cutting and pasting sections easier. But you could use implicit 
sections with <h2> if you prefer.

-- 
Brian Tremblay



More information about the Help mailing list