[whatwg] microdata: itemprop in <col> tag

On Sun, Oct 16, 2011 at 7:47 PM, David Karger <karger at mit.edu> wrote:
> One natural way to represent a collection of structured items is in an html
> table. ?this can coexist with microdata, by using <tr itemscope> and <td
> itemprop> tags. ?But by ignoring the structure of the table, this creates a
> lot of redundant attribute specification.
>
> It would yield cleaner markup if it were possible to use <col
> itemprop="foo"> to indicate an item property that should be inherited by all
> cells in the given column. ?In other words, to assert that any <td>
> associated with a <col> should inherit the itemprop associated with that
> <col> .

Just put an @itemref on each <col>, pointing to the <td>s that are
part of that column.  It's more verbose, but it doesn't rely on
special HTML-only rules.

> It would yield even cleaner markup if there were a way to indicate that
> every <tr> was a distinct itemscope (the common case). ?For example, to use
> <table itemtype="bar"> to indicate that each row of the table scopes an item
> of type bar. ? ?Or perhaps <table itemscope> could be interpreted as
> asserting a distinct itemscope for each row without specifying a type.

I'm not sure I understand.  Are you trying to mark up one item per
row, and just trying to save putting an @itemscope attribute on the
rows?  That's a fairly insignificant amount of savings for the
confusion it can cause (because now the itemscopes aren't obvious).

~TJ

Received on Sunday, 16 October 2011 19:52:13 UTC