Can someone please tell me what is wrong with this?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head><link rel="stylesheet" type="text/css" href="main.css" />
</head>
<title></title>
<body>

This is <em>white</em> text on a<strong> black</strong> background



</body>
</html>

body {
background; #000000;
color: #FFFFFF;
}

It's gotta be something simple that I'm overlooking. I'm not a COMPLETE noob to CSS but I'm not advanced either. It's not showing up in any browser that I use. I just get a blank white page.

Recommended Answers

All 4 Replies

background-color; #000000;

facepalm moment

Biiim is correct there. Change to background-color: The browser isn't "understanding" just background: and ignores it and defaults the background color to white and you are making your text white-on-white. If you click and drag the cursor over the page you'd highlight it and then it would be visible because it is there even if you can't see it.

And not that it effects this but put your title tags inside the open and close head tags =0)

background; #000000;

is incorrect. There should not be a semicolon after background but instead a colon.

background; #000000;

is incorrect. There should not be a semicolon after background but instead a colon.

haha damnit

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.