scorpion Posted April 22, 2010 Report Share Posted April 22, 2010 Hi All - back again! I need to use DocType Frameset for a page that will carry Amazon links. They insist on using <iframe> Problem is trying to validate the page. A stripped down page with no content can be seen here. www.irishtype3dna.org/test2.php As you will see, when I try to validate, I get:- <body> document type does not allow element "BODY" here and </html> end tag for "HTML" which is not finished Any clues? html code is <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <html> <head> <title>Validation Test</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="IrishTypeIII.css" rel="stylesheet" type="text/css"> </head> <body> <div id="container"> <div id="content"> </div> </div> </body> </html> Quote Link to comment Share on other sites More sharing options...
Wickham Posted April 22, 2010 Report Share Posted April 22, 2010 (edited) You don't use the frameset doctype for iframes, only for framesets with frames, so change it to the Strict or Transitional doctype from here http://www.w3.org/QA/2002/04/valid-dtd-list.html Framesets don't have a body tag so that is why you get the errors. Edited April 22, 2010 by Wickham Quote Link to comment Share on other sites More sharing options...
scorpion Posted April 22, 2010 Author Report Share Posted April 22, 2010 Well that gets rid of the <body> and </html> errors but when I drop in one of Amazon iframe links I get plenty of other errors www.irishtype3dna.org/test2.php or www.irishtype3dna.org/Books.php The later is the actual page that I am trying to set up without errors. Quote Link to comment Share on other sites More sharing options...
scorpion Posted April 22, 2010 Author Report Share Posted April 22, 2010 Well, Strict did not work but Transitional did. Pity, as all the other pages on the website are validated Strict ... oh well, better than having errors. And thanks again. Quote Link to comment Share on other sites More sharing options...
Wickham Posted April 22, 2010 Report Share Posted April 22, 2010 Don't worry about having to use a transitional doctype, sometimes you have to if something on the page is deprecated. Error-free validation isn't a requirement, it's a nice-to-have. The iFrame does process the frameborder="0" code in IE and Firefox and will validate with a transitional Doctype. Quote Link to comment Share on other sites More sharing options...
scorpion Posted April 22, 2010 Author Report Share Posted April 22, 2010 Thanks again, Wickham. I always get prompt and helpful tips of coding from you all on Killersites. It certainly is a great forum, much appreciated. Take care ... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.