W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2008

[whatwg] Tagcloud semantics

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 8 Oct 2008 08:12:55 -0500
Message-ID: <dd0fbad0810080612k19a3a0d1qa3624ed1fa2d373e@mail.gmail.com>
On Tue, Oct 7, 2008 at 10:59 PM, Nils Dagsson Moskopp <
nils-dagsson-moskopp at dieweltistgarnichtso.net> wrote:

> Hello,
>
>
> I was wondering what markup one could use for tag clouds and similar
> ways to convey different importance of marked up content. Current
> popular markup involves nested <em> elements, which strikes me as kinda
> complicated and, in extreme cases hard to read.
>
> I was thinking along the lines of a @weight attribute whose value would
> range from 0 (least importance) to 1 (maximum importance) due to
> normalisation (scaling according to power law). This could also used in
> normal text to confer the amount of stress put into phrases - say, for a
> voice client.
>
> I'm aware that this is probably a stupid idea, but, as I said, nested
> <em>s (and custom class names even more so) strike me as particularly
> difficult.


It wouldn't auto-style, but you could use a @data-tag-weight attribute.
Javascript can then come around and set sizes explicitly.

The problem with the proposal as it is is that it ignores the very real
difficulty in figuring out just *how* to scale the tag sizes based on the
weight.  Even with this weight attribute, you'd need a chunk of
newly-crafted CSS to control that decently as well.

On the other hand, a simple javascript library could very easily handle the
styling for you.  It would be a fun weekend project to get something decent
running.

~TJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20081008/ca56daaa/attachment.htm>
Received on Wednesday, 8 October 2008 06:12:55 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:44 UTC