[html5] Appropriate markup for index documents
Andrew Croce
andrew.croce at gmail.com
Sat Dec 27 09:30:33 PST 2014
Wow, love the vitriol!
My question was mainly academic in nature, and I was hoping to hear some
opinions about a matter that has had me curious. I tend to agree with you
in practice, as I have been inclined not to wedge in unnecessary or
inappropriate semantics, and (as you said so colorfully) wouldn't even
bother with a microdata schema in such an obvious page structure. Perhaps
"page" was the wrong word to use anyway, as my question applies equally to
index-like element of a document at any depth.
To restate the question in a different way: since we have semantics for an
article, and break that into headings and sections, etc., why wouldn't it
be appropriate to have a higher level element that describes a meaningful
grouping of articles? I realize you could make an argument asking where it
ends: do we also want elements for museums and kitchen utensils? But 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"?
Thank you all for listening, and sharing your comments.
Andrew
On Fri, Dec 26, 2014 at 4:21 PM, Brian Tremblay <webmaster at tsmchughs.com>
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; since there are virtually unlimited kinds of pages, html
> would need unlimited different elements to contain them. There is
> microdata, which is perhaps what you want:
>
> https://html.spec.whatwg.org/multipage/microdata.html
>
> There is a collection of schema:
>
> http://schema.org/
>
> All of them are supposedly used by Google et. al., but on most types there
> seems to be no difference in how clients treat them.
>
> The specific schema you want is probably
>
> http://schema.org/CollectionPage
>
>
> [rant:]
>
> But I honestly don't see the point. It's parent type is
>
> http://schema.org/WebPage
>
> and what on earth is the point of that? Are we supposed to use microdata
> to tell search engines that our webpage is a webpage? What the #$@# else
> would it be?
>
> If you feel the need to add pointless semantics, than use the
> CollectionPage schema. But I wouldn't bother.
>
> [rant over]
>
>
> 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.
>>
>
> I don't see why you discount section and article. They are perfectly good
> elements. You can put a nav element if it's appropriate, or break it up
> into sections if that's appropriate.
>
> <body>
>
> <p>other content</p>
>
> <section>
>
> <nav> (what would a nav element do here?) </nav>
>
> <h1>list of foo bar pages</h1>
>
> <section>
> <h1>foo</h1>
> <ul>
> <li><a href="foo1">foo 1</a></li>
> <li><a href="foo2">foo 2</a></li>
> <li>etc.</li>
> </ul>
> </section>
>
> <section>
> <h1>bar</h1>
> <ul>
> <li><a href="bar1">bar 1</a></li>
> <li><a href="bar2">bar 2</a></li>
> <li>etc.</li>
> </ul>
> </section>
>
> </section>
>
> </body>
>
>
> If your list, the index of pages, is the sole piece of content on a page,
> than you don't need a container element.
>
> <body>
>
> <h1>list of foo bar pages</h1>
> <ul>
> <li><a href="foo1">foo 1</a></li>
> <li><a href="foo2">foo 2</a></li>
> <li><a href="bar1">bar 1</a></li>
> <li><a href="bar2">bar 2</a></li>
> <li>etc.</li>
> </ul>
>
> </body>
>
> --
> Brian Tremblay
>
> _______________________________________________
> Help mailing list
> Help at lists.whatwg.org
> http://lists.whatwg.org/listinfo.cgi/help-whatwg.org
>
--
Andrew Croce
andrew.croce at gmail.com
andrewcroce.com
732.995.0590
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/help-whatwg.org/attachments/20141227/aa278e4e/attachment.htm>
More information about the Help
mailing list