Hi nymph4.
How's it going with your code, meanwhile?
I've taken a look at your code, copied it and tried to see what the problem was.
I've managed to get your code to work (meaning, you won't see anything other than your formatted h1 text on the page).
The reason why you see "h1 {color:white;font-family:Times New Roman,Arial;}" at the top of your page, I'm not sure why. I think that the browser is treating it as normal text since it isn't between any tags <>.
Again, I'm not sure, but it looks like it. I just know that <head></head> contains meta-data.
Your browser won't know what to do with all this h1 code unless it's told what type of code it is (text/css).
Anyway, I've tried your code and I will show you a not working example and a working example.
(your) not working example:
<html>
<head>
<title>
Test Headers
</title>
h1
{
color: red;
font-family: Times New Roman, Arial;
}
</head>
<body>
<h1>test</h1>
</body>
</html>
My working example (red foreground color for the h1 text):
<html>
<head>
<title>
Test Headers Red Font color
</title>
<style type="text/css">
h1
{
color: red;
font-family: Times New Roman, Arial;
}
</style>
</head>
<body>
<h1>test</h1>
</body>
</html>
Please don't forget that if you have 'color: white;' and you don't specify a background color
in the body tag (<body bgcolor="black">),
that your white text will be invisible against the white background (naturally, white on white).
So to illustrate this, I have put your white text against a black background:
<html>
<head>
<title>
Test Headers White on Black
</title>
<style type="text/css">
h1
{
color: white;
font-family: Times New Roman, Arial;
}
</style>
</head>
<body bgcolor="black">
<h1>test</h1>
</body>
</html>
So yep, it works. Try my code out and see for yourself.
For future reference, please note that it's better to read a comprehensive book on HTML/CSS/languageYouWantToLearn if you want to make good progress (I'm not saying it's the ideal way).
Good books usually explain you HTML/CSS in depth and then you get to understand the why's and hows etc.
Big