Jump to content

validator problem?


adamsg2

Recommended Posts

When I try to validate the doc below, the validator says it is "not valid HTML4.01" because of the two </p>s. With the </p>s omitted, the validator says it is valid. Is that right? [both versions work on my browsers, of course]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <TITLE>Test2</TITLE></HEAD><BODY><p><center>First Paragraph</center></p><p><HR SIZE="6" WIDTH="100%"></p><p>Second Paragraph</p></body></html>

Link to comment
Share on other sites

this works:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><TITLE>Test2</TITLE></HEAD><BODY><center><p>First Paragraph</p></center><HR SIZE="6" WIDTH="100%"><p>Second Paragraph</p></body></html>

pen*

Link to comment
Share on other sites

Or do away with the Center and P altogether and use:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><TITLE>Test2</TITLE></HEAD><BODY><div style="text-align: center;">First Paragraph</div><HR SIZE="6" WIDTH="100%"><p>Second Paragraph</p></body></html>

?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...