[thelist] Wrapping <tr> groups

Bill Moseley moseley at hank.org
Mon Jul 16 17:53:25 CDT 2007

On Mon, Jul 16, 2007 at 03:38:16PM -0600, Ken Snyder wrote:
> Bill Moseley wrote:
> > Here's a basic html question.  Is there a way to structurally group
> > table rows into groups?
> > ...
> >
> > The idea is departments could all be formatted as a unit and
> > "department_employees" can be toggled as a single unit.
> >
> > Obviously, I can just add class tags to the <tr>, which is what I'm
> > currently doing.
> >   
> You can use <tbody> tags to represent a group of <tr>s.  <tbody> 
> sections can then be shown or hidden using javascript:

Oh, I thought I tried that and it failed validation.  Oh, maybe I
tried to nest the <tbody> sections and that fails validation.

> Unless you are using vary large tables, you probably won't notice much 
> of a speed difference over using <tr>s with classes.  Why do you want to 
> switch?

Just to to add structure - I have a group of things (which happen to
be <tr> rows) so it makes sense to wrap them in an element.  <tbody>
works for that.  In my case I want to then, within that group, contain

<tr>'s don't really logically nest, so I can see why this won't work.
the <tbody> will be helpful.

Bill Moseley
moseley at hank.org

More information about the thelist mailing list