This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Headings within sectioning elements should start with H1 instead of H2/H3 as shown in the section element example below. "<article> <header> <h2>Apples</h2> <p>Tasty, delicious fruit!</p> </header> <p>The apple is the pomaceous fruit of the apple tree.</p> <section> <h3>Red Delicious</h3> <p>These bright red apples are the most common found in many supermarkets.</p> </section> <section> <h3>Granny Smith</h3> <p>These juicy, green apples make a great filling for apple pies.</p> </section> </article>"
(In reply to Ryan McGinty from comment #0) > Headings within sectioning elements should start with H1 instead of H2/H3 as > shown in the section element example below. > > "<article> > <header> > <h2>Apples</h2> > <p>Tasty, delicious fruit!</p> > </header> > <p>The apple is the pomaceous fruit of the apple tree.</p> > <section> > <h3>Red Delicious</h3> > <p>These bright red apples are the most common found in many > supermarkets.</p> > </section> > <section> > <h3>Granny Smith</h3> > <p>These juicy, green apples make a great filling for > apple pies.</p> > </section> > </article>" why?
(In reply to steve faulkner from comment #1) > (In reply to Ryan McGinty from comment #0) > > Headings within sectioning elements should start with H1 instead of H2/H3 as > > shown in the section element example below. > > > > "<article> > > <header> > > <h2>Apples</h2> > > <p>Tasty, delicious fruit!</p> > > </header> > > <p>The apple is the pomaceous fruit of the apple tree.</p> > > <section> > > <h3>Red Delicious</h3> > > <p>These bright red apples are the most common found in many > > supermarkets.</p> > > </section> > > <section> > > <h3>Granny Smith</h3> > > <p>These juicy, green apples make a great filling for > > apple pies.</p> > > </section> > > </article>" > > why? I may have misinterpreted the outlining specification. I was under the impression that each sectioning element essentially creates an inner section outline and therefore requires the main title of that section to be an H1 (re-setting the hierarchy). After re-reading it sounds like that is not necessarily the case.
The root of my confusion is the examples 4.4 in the editors draft "Sections" (below) where I thought it was implying that it HAD to be coded that way in order to achieve the same outline. My further reading suggests that this can be done with lower heading elements and still achieve the same result. The following document shows a straight-forward application of the outline algorithm. First, here is the document, which is a book with very short chapters and subsections: <!DOCTYPE HTML> <title>The Tax Book (all in one page)</title> <h1>The Tax Book</h1> <h2>Earning money</h2> <p>Earning money is good.</p> <h3>Getting a job</h3> <p>To earn money you typically need a job.</p> <h2>Spending money</h2> <p>Spending is what money is mainly used for.</p> <h3>Cheap things</h3> <p>Buying cheap things often not cost-effective.</p> <h3>Expensive things</h3> <p>The most expensive thing is often not the most cost-effective either.</p> <h2>Investing money</h2> <p>You can lend your money to other people.</p> <h2>Losing money</h2> <p>If you spend money or invest money, sooner or later you will lose money. <h3>Poor judgement</h3> <p>Usually if you lose money it's because you made a mistake.</p> This book would form the following outline: The Tax Book Earning money Getting a job Spending money Cheap things Expensive things Investing money Losing money Poor judgement Notice that the title element does not participate in the outline. Here is a similar document, but this time using section elements to get the same effect: <!DOCTYPE HTML> <title>The Tax Book (all in one page)</title> <h1>The Tax Book</h1> <section> <h1>Earning money</h1> <p>Earning money is good.</p> <section> <h1>Getting a job</h1> <p>To earn money you typically need a job.</p> </section> </section> <section> <h1>Spending money</h1> <p>Spending is what money is mainly used for.</p> <section> <h1>Cheap things</h1> <p>Buying cheap things often not cost-effective.</p> </section> <section> <h1>Expensive things</h1> <p>The most expensive thing is often not the most cost-effective either.</p> </section> </section> <section> <h1>Investing money</h1> <p>You can lend your money to other people.</p> </section> <section> <h1>Losing money</h1> <p>If you spend money or invest money, sooner or later you will lose money. <section> <h1>Poor judgement</h1> <p>Usually if you lose money it's because you made a mistake.</p> </section> </section> This book would form the same outline: The Tax Book Earning money Getting a job Spending money Cheap things Expensive things Investing money Losing money Poor judgement
(In reply to Ryan McGinty from comment #3) > The root of my confusion is the examples 4.4 in the editors draft "Sections" > (below) where I thought it was implying that it HAD to be coded that way in > order to achieve the same outline. My further reading suggests that this can > be done with lower heading elements and still achieve the same result. > right unfortunately this is theoretical only as no AFAIK user agents implement the outline algorithm, so use of <h1>s only doesn't have the desired effect. There is advice in the spec about using headings of the appropriate rank: "Sections may contain headings of any rank, and authors are strongly encouraged to use headings of the appropriate rank for the section's nesting level." http://www.w3.org/html/wg/drafts/html/master/sections.html#headings-and-sections
HTML5.1 Bugzilla Bug Triage: Won't fix, heading can be of any rank in section elements. If this resolution is not satisfactory, please copy the relevant bug details/proposal into a new issue at the W3C HTML5 Issue tracker: https://github.com/w3c/html/issues/new where it will be re-triaged. Thanks!