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

<!DOCTYPE> vs. STYLE

From: Lam Thai <lamthai@yahoo.com>
Date: Thu, 3 Oct 2002 16:25:50 -0700 (PDT)
Message-ID: <20021003232550.87851.qmail@web11602.mail.yahoo.com>
To: www-html@w3.org

Hello,

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!!!

-------------------------------------------------
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!-- how come this HTML code behave differently w/ and
w/o the firstline (i.e <!DOCTYPE>)? -->

<html>
<head>
<style type="text/css">
table {background-color: "blue"}
p {background-color: rgb(250,0,255)}
</style>

</head>

<body>
<table><tr><td>
<p>This is a paragraph</p>
</td></tr></table>
</body>

</html>
-------------------------------------------------

Thanks,
Lam


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
Received on Thursday, 3 October 2002 19:27:11 GMT

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