what is wrong with this html code I cant figure it out!?

eric S

New member
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<head>
<title>Homecomeing</title>

<style type="text/css">


body{background-image:url("http://www.jabezdesign.com/downloads/backgro

unds/cool_blue-r.jpg"); text-align:center}
#header1{color:white}
#header2 {color:navy}
</style>
</head>

<body>

<h1>The homecoming football game</h1>
<img id="pic1"

src="http://hssn-media.advance.net/MLive.com/news/e0124edbd317b555df7af

64e2c2bdbf2/westcatholic.JPG" >

</body>



****I am trying to get <h1> to the color white!! what is wrong??? can't see it
 
In your CSS you have this:

#header1{color:white}

This is saying that an element whose id attribute is "header1" should have white text. That's what the # sign is for: it means that what's after it should be treated as an id.

Nowhere in your HTML code is there any element with an id of "header1".

To make this work, you'd need to add that id to your h1 element, like so:

<h1 id="header1">The homecoming football game</h1>

Please ignore the other answer. Do not use font tags for anything; use CSS instead, as you are doing now.
 
header1 and an <h1> tag aren't the same thing. You need to use either

h1 { color: white; } in you CSS style tag, or:
<h1 id="header1">The homecoming football game</h2> in your HTML.
 
Back
Top