[html5] Using <section> and <h1> … Theoretical?

Jukka K. Korpela jukka.k.korpela at kolumbus.fi
Thu May 8 23:14:02 PDT 2014


2014-05-09 4:10, Micky Hulse wrote:
> – <https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Sections_and_Outlines_of_an_HTML5_document>
>
> I don't know why, but it just seems kinda odd to see that as a big red
> warning message at the top of that page. I dunno … While it may be
> true, it doesn't seem helpful.

It’s rather simple. People who read just theoretical descriptions of 
<section>, <h1> etc. and the outline algorithm will get a completely 
wrong picture of how things actually work, if they are not warned. They 
will use <h1> even inside deep nesting of <section> elements, thinking 
that they are specifying a subsub...subsection heading, while in 
reality, all relevant software will treat it as 1st level heading, a 
heading for the entire page.


> Also, wouldn't that confuse newcomers to HTML5?

It’s the outline algorithm and related descriptions and theoretical 
rules that confuse newcomers (and others).

> Personally, I like the new way of doing things (even if it is "theoretical").
>
>

Its being nice-looking and logical-sounding is part of its risks.

The situation would be better if <h> (without any number) were used for 
the heading of a <section>. After all, if you use nested <section> 
elements to indicate all thematic parts of a document (division into 
sections, subsections, etc.), you should never have any need need for 
heading elements that express the level of the heading – except for 
compatibility with existing user agents. Current user agents would of 
course not recognize <h>, but at least they would not get the levels of 
headings all wrong. And authors that prefer documents that work to 
documents that comply with a theoretical model could use <h1>, <h2> in a 
simple manner according to the levels of headings relative to the 
document as a whole.

The risky part is the idea of <h1> being interpreted relative to 
<section> elements and their nesting. The outline algorithm (and the 
<section> element) is as such a theoretical exercise that does not help 
much but does not cause harm either.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/



More information about the Help mailing list