Forum Moderators: open
<h3><a href="headpieces.html">Headpieces</a></h3><br>[/quote]
Using the Netmechanic tool, I am trying to fix errors and hopefully validate. Previously, I had a </hr>. When I removed it, the <h3> was affected.(i.e. no underline and same color as <hr>) It worked fine before I changed it, at least on my browser. Thanx for any help in advance.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>HR - H3</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<hr style="background:#FF69B4;" />
<h3><a href="headpieces.html">Headpieces</a></h3>
</body>
</html>
Technically, you want to apply a "background-color" to your <hr /> not the "foreground" property, color:
(edited by: papabaer at 2:47 pm (utc) on May 25, 2002)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
Papabaer, did you look at the page in question. If so, is this the DTD(I think that's what it's called) I should use?
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<?xml version="1.0" encoding="ISO-8859-1" ?><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
Sorry I never came back to help I got sidetracked on a little project and have only moved from it to fetch beer ;-)
Nick
Using a <!doctype> is the first step in writing validating code. You can find a great tutorial on XHTML (HTML formatted as XML) at W3Schools: [w3schools.com...]
It is not much different than HTML at all, just more formal. It is very easy to learn and the advantages are validating code that can be read across browsers and devices.
You might also wish to move your "inline-style" to the head content:
<sytle type="text/css">
hr {
background:#ff69b4;
}
</style>
Here you have greater control, better still, create your CSS and move them to your external stylesheet.
Best of luck! - papapbaer
If you've only been coding a few months then learn good habits by coding and validating at [validator.w3.org ] and use the xhtml 1.1 or strict dtd's it'll stand you in good stead for the future and as Papabear said, it's actually rather easy.
Nick
"warm and fuzzy"