Then I ran the page through the validator again (using Firefox). This time, it
didn’t find fault with the styleelement, but it still complained about that
“missing” end tag. Not willing to let this validator get the best of me,
I then ran an .html file that I knew to be “fully compliant” through it and sure
enough, it passed. This other file got this blessing from the validator: The
uploaded file was tentatively found to be valid.A victory! Well,
not a complete victory because it’s just tentatively valid.
So I tried deleting various elements near the
element to see if remov-ing something would trigger the same error message about the end
tag. Eureka! It’s this:
<title>My Title</title>
If you omit the title element (optional, I always thought, because browsers
don’t care about it), the validator tells you that you’re missing a head ele-
ment. Well, that’s not what’s missing, but at least after some experimentation,
I was able to satisfy the validator and get its tentative approval with the fol-
lowing change to the code:
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01
Transitional//EN”
“http://www.w3.org/TR/html4/loose.dtd”>
<html>
<head>
<title>Some Supposedly Optional Title</title>
<style type=”text/css”>
body { margin-top: 25px; margin-bottom: 25px; margin-left:
25px; margin-right: 25px; }
</style>
</head>
<body>
<P>This is paragraph one.</P>
</body>
</html>