...

View Full Version : elementary css:firefox and IE won't read colour mark-up



adj
06-06-2007, 03:52 PM
Beginning html, I wrote the file below from a w3 tutorial (referenced at end), and Firefox and IE read the file but do not respond to the style statements - what am I doing wrong please ? (sorry it's such an naive question)

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>

<head>
<title>My first styled page</title>
<style type="text/css">
body (
color: "purple";
background-color: #d8da3d
}
</style>
</head>


<body>

<!-- Site navigation menu-->
<ul class="navbar">
<li><a href="index.html">Home Page</a></li>
<li><a href="musings.html">Musings</a></li>
<li><a href="town.html">Toytown</a></li>
<li><a href="links.html">Links</a></li>
</ul>


<!-- Main Content -->
<h1>My first-and-a-half Styled page</h1>

<p>Welcome to this first and a bit attempt including colour !</p>

<p>It lacks images, but at least it has style.
And it has links even if they don't go anywhere&hellip; </p>

<p>There should be more here, but I don't know what yet.</p>

<!-- Sign and date the page, it's only polite! -->
<address> Copied by me, adj,<br> on 5 June 2007 from W3C Style examples tutorial http://www.w3.org/Style/Examples/011/firstcss.en.html.</address>

</body>
</html>

ahallicks
06-06-2007, 04:40 PM
<style type="text/css">
body (
color: "purple";
background-color: #d8da3d
}
</style>

Should read:

<style type="text/css">
body {
color: purple;
background-color: #d8da3d
}
</style>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum