On Aug 18, 4:47 pm, "T.J. Crowder" <
t...@crowdersoftware.com> wrote:
> Colin,
>
> > Incidentally (and not on topic for your question)
> > <td/>
> > is not valid in either HTML or XHTML.
>
> It's valid XHTML for an empty table cell.
>
Wrong. It's a common misconception (which I had myself until
recently).
"All elements other than those declared in the DTD as EMPTY must have
an end tag. Elements that are declared in the DTD as EMPTY can have an
end tag or can use empty element shorthand (see Empty
Elements)." (
http://www.w3.org/TR/2002/REC-xhtml1-20020801/#h-4.3)
That is, elements DECLARED TO BE EMPTY may use the shorthand. Elements
which happen to have no content may not.
I discovered this when Firefox correctly objected to <td/> or
something when I had given it an XTHML-Strict DOCTYPE.
> > Also, <td> does not have a 'type' attribute. I believe browsers
> > generally do let you set an arbitrary attribute (though I haven't
> > found anything in the HTML spec that explicitly permits it)...
>
> It is in fact verboten.
Is it? I couldn't find an explicit statement that only the defined
attributes were permitted, though it is implied (and I thought I had
found somewhere in the HTML spec where it referred to 'attributes
defined in this specification', which might be taken to imply that
other attributes were permitted; but I can't find that now).