[html5] Appropriate markup for index documents

Brian Tremblay webmaster at tsmchughs.com
Sat Dec 27 11:09:22 PST 2014


On 12/27/14 9:30 AM, Andrew Croce wrote:
 >>
 >> On Fri, Dec 26, 2014 at 4:21 PM, Brian Tremblay wrote:
 >>
 >>> On 12/23/14 8:14 AM, Andrew Croce wrote:
 >>>
>>> 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.
>>
>> I'm not sure what you want. There is no specific element for
>> different kinds of pages
>
> My question was mainly academic in nature

On matters of html and the web, academic questions are generally moot. 
html versions that were widely adopted were generally attempts to get 
the language to match up with what browsers were already doing. It was, 
unfortunately imho, a capitulation to Netscape and MS. Consider html 3.2 
and html 4.01 (in particular, the loose flavor of 4.01). By contrast, 
the academic stuff eg., html 3.0, xhtml 2.0, were abandoned.

> Perhaps "page" was the wrong word to use anyway, as my question
> applies equally to index-like element of a document at any depth.

I don't really know what you have in mind here.

> To restate the question in a different way: since we have semantics
> for an article, and break that into headings and sections, etc.

article is just a section that can be understood alone. And section is 
just a part of a document.

> why wouldn't it be appropriate to have a higher level element that
> describes a meaningful grouping of articles?

<section>

  <article>
   <h1>foo</h1>
   <p>foo fob fog fon fol</p>
  </article>

  <article>
   <h1>bar</h1>
   <p>bar baz bat bal</p>
  </article>

  <article>
   <h1>dor</h1>
   <p>dor don doo dop</p>
  </article>

</section>

> I think an index is a broad enough concept with both structural and
> semantic implications, that it might deserve (at least hypothetical)
> consideration as an HTML element. After all, isn't the default page
> that a server serves called "index"?

Defaults on the web are often due to what made sense in a unix-y 
environment when the web was born. If a url corresponded to a directory 
on the server, it made sense to show a list of pages located in that 
directory. If you wanted to build your own such list, you would then 
call it "index.html".

A few servers used "default.html" instead, which, in hind sight, would
have been preferable, since what you want is the page that is shown by
default if a url corresponds to a directory, but not to any specific
document in that directory. most "index.html" pages do not contain an index.

-- 
Brian Tremblay


More information about the Help mailing list