adamsg2 Posted October 9, 2005 Share Posted October 9, 2005 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 More sharing options...
F-Man Posted October 9, 2005 Share Posted October 9, 2005 Hm, well, first, it makes more sense to put the first paragraph inside the <center> tag. And second, I don't think HRs must be inside paragraphs. Link to comment Share on other sites More sharing options...
dain Posted October 9, 2005 Share Posted October 9, 2005 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 More sharing options...
Webworldx Posted October 9, 2005 Share Posted October 9, 2005 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 More sharing options...
adamsg2 Posted October 10, 2005 Author Share Posted October 10, 2005 Thanks, guys.I'm ok now. The validator's suggestions were a bit misleading.Glenn Adams Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now