Height attribute on TABLE (was Re: [thelist] Accesibility Tip)

Techwatcher techwatcher at accesswriters.com
Thu Jun 13 08:35:09 CDT 2002


> >> What's up with the W3 validator? It tells me for example that the
height
> >> attribute for tables is not supported in 4.01 transitional. Can
this be?
> >
> > Well, just read the spec and you'll see that there isn't a height
attribute:
> >
> > http://www.w3.org/TR/html401/struct/tables.html#edef-TABLE
> >
> > Height on TABLE was introduced by Netscape in version 1.1, but has
never
> > been part of any W3C HTML specification.
>
> So should I have used the <td> tags to control height to conform?
This seems
> to be valid, but also depreciated. Why is this? Is tere a better way
to
> control table height?
>
> Will pages conforming to the w3 validator's standards always render
> correctly?
>
> I have used the "background" attribute in some instances which is not
> validated. It depreciates very well, but it does not conform to the
w3c
> specs. I don't think I should slavishly stick to the w3c
recommondation in
> this case. Any other opinions?
>
> Thanks in advance,
>
> Sebastian
>

Again, from reading the CSS2 specs, I suspect height is not supported
for tables because the standards developers are moving towards
reconceptualizing the block (and block-like) thingies. We are moving in
the direction of "all stuff to be REPLACED (such as IMG)" must have
height and width (or size) attributes specified. All stuff not to be
REPLACED (i.e., TABLE tag) may NOT have size attributes.

The height & width are supposed to be there so the browser can allocate
space while it's following the rules to render the DOM, after all.
Table doesn't need a height (or width) according to this model. All its
sub-objects have containing boxes with their own padding/border/margin,
so the total height will be computed.

If you're trying to control a table's height to make it printable, you
can create a CSS just for that medium.... It won't have any effect on
the other (screen) rendering.

Cheers --
techwatcher (Carol Stein)



More information about the thelist mailing list