W3C home > Mailing lists > Public > www-html@w3.org > October 2002

Re: <!DOCTYPE> vs. STYLE

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 3 Oct 2002 23:31:49 +0000 (GMT)
To: Lam Thai <lamthai@yahoo.com>
Cc: "www-html@w3.org" <www-html@w3.org>
Message-ID: <Pine.LNX.4.21.0210032330440.3418-100000@dhalsim.dreamhost.com>

On Thu, 3 Oct 2002, Lam Thai wrote:
> 
> Please help. Why does the following html codce behave
> differently w/ and w/o the first line, the one that
> contains <!DOCTYPE>?
> - W/O the first line, table bgcolor is "blue"
> -W the first line , it does not work!!!
>
> table {background-color: "blue"}

This is invalid CSS. With the DOCTYPE, you are triggering the browser's
"strict" mode, which correctly ignores invalid CSS.

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
"meow"                                          /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 3 October 2002 19:31:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:53 GMT