[html5] Appropriate markup for index documents

Not Telling binderbound at hotmail.com
Wed Dec 24 14:02:11 PST 2014

Ahh, I see
Under the first example you gave, it may be appropriate to use a main element, as the index is the prime focus of the page. I've thought about this for a bit, and I'm not sure it is really necessary to semantically declare that you are giving us an index or contents page, in a similar way to how it isn't necessary for someone to declare certain sections as a reference list/bibliography or other sections as background decoration. HTML is becoming increasingly focused on structure, but in your case, knowing that you ate giving us an index or catalog does nothing to assist structure - rather you are describing the content in your structure. There are examples in HTML where content is described, such as Blockquote, but these are mostly left behind from HTML 4

Subject: Re: [html5] Appropriate markup for index documents
From: andrew.croce at gmail.com
Date: Wed, 24 Dec 2014 12:07:48 -0500
CC: help at whatwg.org
To: binderbound at hotmail.com

So what I was considering is something like a catalog…
<index> <!— What element should this be? —>	<header>		<h1>Catalog of Items</h1>		<p>A description of the catalog...</p>	</header>
	<nav>{some filters, perhaps}</nav>		<ol>		<li>Catalogued item #1</li>		<li>Catalogued item #2</li>		<li>Catalogued item #3</li>		...	</ol>

I suppose you could possibly argue that a <dl> might satisfy the semantics, though it wouldn’t really be a definition LIST, just sort of a highly abstracted definition… a stretch, I think. Also, its not clear how sectioning algorithms would handle the scope of a headings, for instance, in the context of a <dl>.
<dl>	<dt>		<header>			<h1>Catalog of Items</h1>			<p>A description of the catalog...</p>		</header>		<nav>{some filters, perhaps}</nav>	</dt>
	<dd>		<ol>			<li>Catalogued item #1</li>			<li>Catalogued item #2</li>			<li>Catalogued item #3</li>			...		</ol>	</dd></dl>
On Dec 24, 2014, at 3:26 AM, Not Telling <binderbound at hotmail.com> wrote:Misspelt help

From: binderbound at hotmail.com
To: andrew.croce at gmail.com
CC: hep at whatwg.org
Subject: RE: [html5] Appropriate markup for index documents
Date: Wed, 24 Dec 2014 19:23:42 +1100

Hi Andrew
I believe a description list <dl> (previously definition list) would be the closest fit to what you describe. It has two accepted child elements - definition term <dt> to declare the term being defined and definition description <dd> which describes the term it follows. The page you describe would be the <dt> and a description od the page, or another sub-index for that term would fit under <dd>. Nesting gives you some degree of "sectioning" but not exactly in the way you want, I expect. Could you give a specific example of the usage you are talking about? Use invented elements if you want - I'm just unsure exactly what you mean.


From: andrew.croce at gmail.com
Date: Tue, 23 Dec 2014 11:14:37 -0500
To: help at whatwg.org
Subject: [html5] Appropriate markup for index documents

I have been wondering about this for a while now, and I've finally gotten around to writing up the question: 
What is the appropriate semantic container element (if any) for an index document?
It seems to me that there is a gap in the semantic options for marking up index, or list, pages. Now, to be clear I realize there are list elements, but these are strictly for marking up the specific set of listed items. However, a list may have a larger context, which I am calling an index.
Like an article, an index might have a header and footer, and should probably contain a <ul> or <ol> where the items are listed. What comes to mind is something like a catalog, where the list itself has some meta information, and could itself contain sections or navigation. An <article> seems inappropriate since that should, I believe, be a single piece of content. A <section> also seems inappropriate in itself, unless its part of an even larger context. It could just be a <div>, or nothing at all, but I feel like there is some semantic value being missed.
So then, why is there no <index> element? I would be super curious to hear everyone's thoughts on this.
Andrew Croce
andrew.croce at gmail.com
_______________________________________________ Help mailing list Help at lists.whatwg.orghttp://lists.whatwg.org/listinfo.cgi/help-whatwg.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/help-whatwg.org/attachments/20141225/2f2db35f/attachment-0001.htm>

More information about the Help mailing list