In finding the best term for separating a collection of items, which to use—list or group?

Brain dump:

List implies linearity, structure.

Group implies randomness.

In generalizing the semantics of all items in a collection—in an HTML document—go for group.

<ul class="list group">…</ul>

<div class="group">…</div>

<dl class="list group">…</dl>

It is important to note that the all HTML elements in the examples could express hierarchy by nesting other elements—but it is in the collection of items that list or group provides semantics.

To recap:

Use list for collection of items that implies order (yes, even for <ul>).

Use group for collection of items that does not imply order.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *