[whatwg] 'Main Part of the Content' Idiom

Ian Hickson ian at hixie.ch
Wed Aug 4 15:46:43 PDT 2010


On Fri, 4 Jun 2010, Smylers wrote:
>
> The HTML5 spec should define how to mark up the main content on a page 
> (even if the answer is "by omission"). This is something that many 
> authors ask about, the latest example being today's thread on the help 
> mailing list: 
> http://lists.whatwg.org/htdig.cgi/help-whatwg.org/2010-June/000561.html
> 
> Please could this be added to the 'idioms' section, perhaps giving 
> examples of when <article> or <section> might be appropriate as well as 
> one in which the main content is simply that which isn't in <header>, 
> <aside>, etc.

Done.


On Fri, 4 Jun 2010, Daniel Persson wrote:
>
> I am the one posting the question on the help list. To me, the lack of 
> html5 definition of main content, ie body copy in paper publishing, is a 
> big mistake. Imagine the amount of sites where "everything else" 
> includes a lot of unimportant extra, or peripheral, content. Content 
> which is not necessarily hierarchically legible by a machine. Getting 
> authors to be disciplined about defining main content is more important 
> than being disciplined about <nav>, <footer>, <header>, <section> etc, 
> in order not to negate the meaning of html5 structural mark-up.
> 
> Suggestion <bodycopy>... or, preferred, <bread>.

Getting authors to be disciplined about defining main content is in fact 
the same as being disciplined about <nav>, <footer>, <header>, etc, 
because the main content is anything not in those elements.


On Fri, 4 Jun 2010, Daniel Persson wrote:
>
> Some websites are very crowded. I have no particular example. Blogs and 
> easily accessible CMS's, people trying to make a buck from excessive 
> advertising on their site, people cramming a lot of info/screen unit. 
> Companies too, old media: http://www.aftonbladet.se/ (major Swedish 
> paper, watch your eyes) . <body> will hold a lot of stuff that is not 
> main content, other content will spill over into <body> (unless there is 
> a conscious author, and vast use of <aside>).
>
> It should be easy for authors to define main content. It s a pedagogical 
> issue, where authors not too concerned with standards compliance, should 
> have an easy escape of at least defining the most important on the site.

We could either mark up what's the main content, implying that everything 
else is not the main content, or mark up what's not the main content, 
implying that everything else is the main content. We've gone with the 
latter, because it turns out that the main content's presentation is 
usually just the default, whereas everything else needs to be styled 
specially, so people usually want to wrap the non-main-content.

However, there are cases where you also want to wrap the main content. For 
those cases, we have <article>, <section>, and <div> (in increasing order 
of vagueness).


On Fri, 4 Jun 2010, Tab Atkins Jr. wrote:
> 
> Authors can either use <aside> to mark up all the irrelevant stuff on 
> their page that isn't main content, or they can wrap the main content in 
> an <article> (not ideal, but workable).

Actually it's pretty much what <article> was meant for.


On Mon, 7 Jun 2010, Daniel Persson wrote:
> 
> What I am taking about is that it is upside down to expect honest people 
> to define everything except the main content. Pedagogically and 
> methodologically. Main content is main content, the most important to 
> define. That should be the starting point for the structure.

I don't understand why.

Think of a sentence:

   I like kittens (and cats).

The important content is "I like kittens". The less important content is 
"and cats". We mark up the less important content.


> The simplest tutorial on html5 authoring should be: Getting doctype and 
> charset right, html, head, body. Then define main content. Finished. 
> Ready to be indexed.

I don't see why the "define main content" step is useful. What problem 
does it solve?


> ...bu at least the main content (as defined by the author) can be 
> reached, indexed, sorted or stacked by machines.

This seems to be a solved problem today, without any markup.


On Fri, 4 Jun 2010, Aryeh Gregor wrote:
> 
> It's unwise to omit <body> unless you can guarantee that the first 
> element in the body will actually trigger the end of the head.  In your 
> case, I believe that at least IE will put <aside> and <article> in the 
> head, because it doesn't recognize them as only belonging in the body.  
> (It seems like the HTML5 parser does put it in the body -- although as 
> far as I can tell, this means we can never introduce new elements that 
> can go in the head.)

We just add them to the list of elements that go in head, and wait a few 
years.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list