Previous Message
Next Message

css-discuss archive

Sent by James Denholm-Price on 24 June 2004 22:10


On Thu, 24 Jun 2004 12:39:04 -0400, Jeff Ferrell [EMAIL-REMOVED]> wrote:
> I've got some data I need to present in tables, but I'm not clear
> anymore on what's in line with W3C spec's. Here's what I'm wondering:
> Is it required that text in a <td> also be enclosed in a <p>? Or does
> the <td> take care of that?
XHTML1 Strict & Transitional allow both inline and block elements inside td's
http://www.w3.org/TR/xhtml1/dtds.html#dtdentry_xhtml1-transitional.dtd_td
http://www.w3.org/TR/xhtml1/dtds.html#dtdentry_xhtml1-strict.dtd_td

What's best accessible practice probably depends on what the content
is (i.e. if it's a paragraph of text then put it in a paragraph; if
it's a data item whose 'type' is obvious from the relevant row/column
heading then it's presumably fine inside a td.) Joe Clark's book
"Building Accessible Websites" has a good section on accessible
tables.

> When styling text, is one allowed to lay *text* styles on a <td>, <tr>,
> or even <table> element, of should <p> elements within the table handle
> that?
Sure ... modern browsers (IIRC this excludes IE except in IE6
standards mode) cascade CSS properties correctly. You can use td
{padding...} etc. if you want to avoid the need for table
cellpadding/cellspacing attributes and need tr styles for many things
.... if only it were already possible to apply column styles! (Will
CSS3 selectors allow this?)

James
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: