Re: Problems/Question with Cougar

Stuart Young wrote:
> 
> On Fri, 23 Aug 1996, Imagination's End wrote:
> 
> > > TD { background : red }
> > > in my style sheet, and <TD BGCOLOR="blue"> in my table, which color
> > > should this table cell get?
> >
> > That makes senses, but, what happens if you have:
> >
> > <TD STYLE=" TD { background: red }" BGCOLOR="blue">
> >
> > What color SHOULD the cell get.  Granted I'll admit this is probably
> > just stupid coding, and that if you specify both background and
> > bgcolor they should both be the same.

I would say that the background colour should be undefined. Both
browsers which make the background red or those making them
blue should be 'conforming'. And for that matter, those who make
the background yellow or pink.

> 
> Well, like anything else, the 'last defined' colour should be the
> over-riding one.
> 
> It's as simple as that, isn't it???

Uhm, no. That would mean the order of attributes is important.
It might be that SGML says it is, but I have never heard of it.
I would image implementations of HTML parsers differ wether 
order of attributes is important or not. If I were to make a
parser, I'd put attributes of an element in an associative
array - which usually loses the order.

I think <foo bar = baz plugh = xyzzy> shouldn't differ from
<foo plugh = xyzzy bar = baz>, for any foo, bar, baz, plugh
and xyzzy.

What does SGML say? Is order important?


Abigail

Received on Tuesday, 3 September 1996 15:23:56 UTC