[wp-hackers] Tag cloud semantics

Andy Skelton skeltoac at gmail.com
Wed Jan 23 21:37:55 GMT 2008

On Jan 23, 2008 10:13 AM, Stephen Rider <wp-hackers at striderweb.com> wrote:
> How about producing styles of 100+n percent ?  Then the cloud itself
> can have a font size set (say... 80%), and individual tags within
> would be sized relative to that.  The 80% would be the smallest tags....

This is the most interesting idea I've seen here, but I still don't
see any problems with using explicit sizes.

I do not like the idea of a finite number of size classes for tag
clouds. The wrong assumption is that classes are a better semantic
representation than rational numbers for the infinite-and-bounded
range of values expressed by a tag cloud. When you reduce that range
to a finite set of values, you must force different values into group
together and thereby lose information. It is beyond lossy; it is

To answer the OP's question, explicit sizes have the following benefits:

* There are an infinite number of possible sizes because any rational
number (e.g. 3.14159) will work.
* Rational numbers do not need to be defined in a stylesheet.
* Rational numbers are compact and easy to understand.
* It is easy to give the user control over the size ranges: upper and
lower bounds are familiar font sizes.

There are also some interesting things you can do to manipulate the
data in rational number format that you cannot do with nested
big/small tags or pre-defined classes: you can write code to change
the way the browser represents the data.

For example (not that I've seen it done, but feel free to try it)
there can be a javascript function written to allow the viewer to sort
the terms according to any value associated with each term, such as
its font size. In this way, you can convert a cloud into an ordered
list. I have seen tables that can be sorted by different columns; why
not the ability to switch the cloud's size basis to different values
(post count, comment count, view count, etc.) or to convert between
clouds and tables? This would not be so straight-forward without
rational numbers.

So I hope we leave it the way it is.


More information about the wp-hackers mailing list