Jump to content

Trying to validate in XHTML 1.0 Frameset - PLEASE HELP!


LifeInBinary

Recommended Posts

THIS TOPIC HAS BEEN RESOLVED.I only have 3 errors, but I can't even figure out what the validator is talking about.Can somebody please help me figure out how to get this to validate?Here is the code:

<!DOCTYPE htmlPUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>McKeon & Associates LTC</title><meta name="robots" content="index" /><meta name="author" content="James C. Williams II" /><meta name="copyright" content="Copyright © 2007 McKeon & Associates" /><meta http-equiv="content-language" content="en-US" /><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><meta name="description" content="Long Term Care Insurance with McKeon & Associates" /><meta name="revised" content="James C. Williams II, 03/14/07" /><meta name="keywords" content="john, mckeon, associates, longterm, care, insurance, certified, senior, advisor, csa, national, ethics, bureau, approved, neb" /><meta http-equiv="imagetoolbar" content="no" /><link rel="stylesheet" type="text/css" href="global.css" /><script type="text/javascript" src="security_1.js"></script><script type="text/javascript" src="security_3.js"></script></head><body class="bg"><script type="text/javascript" src="security_2.js"></script><table border="0" cellspacing="0" cellpadding="0"><tr>  <td background="images/content_header.jpg" colspan="2" width="660" height="30" class="header">About Us:</td></tr><tr>  <td colspan="2" width="660" height="18"><img src="images/content_top.jpg" alt="" /></td></tr><tr>  <td width="30" height="198"><img src="images/content_bullets.jpg" alt="" /></td>  <td><iframe src="about_iframe.html" name="about_iframe" frameborder="0" marginwidth="0" marginheight="0" width="630" height="198"></iframe></td></tr><tr>  <td colspan="2"><img src="images/content_bottom.jpg" alt="" /></td></tr></table></body></html>

And here is what the validator had to say:This page is not Valid XHTML 1.0 Frameset!Below are the results of checking this document for XML well-formedness and validity. ----------Error Line 20 column 16: document type does not allow element "body" here.<body class="bg">The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed). One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error). ----------Error Line 24 column 17: there is no attribute "background". <td background="images/content_header.jpg" colspan="2" width="660" height="30"You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead). This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information. How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash. ----------Error Line 38 column 6: end tag for "html" which is not finished.</html>Most likely, You nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p> Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, <head> generally requires a <title>, lists (ul, ol, dl) require list items (li, or dt, dd), and so on. I will probably be needing help with other individual pages on this website, so if you guys could check back - that would be awesome. Step one is to figure this page out, then I will be able to fix most of the other ones - but I might still be needing help :)As always, thanks guys - you're all a really big help,LifeInBinary.

Link to comment
Share on other sites

you are using a frameset doctype but you are not using a frameset in your page. Use either transitional or strict.background is depreciated in XHTML. Use css background-image or background-color instead.Not sure why you get that last error. It may be a symptom of the first error. Fix the first two and see if you still get the last error

Link to comment
Share on other sites

you are using a frameset doctype but you are not using a frameset in your page. Use either transitional or strict.background is depreciated in XHTML. Use css background-image or background-color instead.Not sure why you get that last error. It may be a symptom of the first error. Fix the first two and see if you still get the last error
Awesome. Thank you, that worked out fine. It validates now. I assumed that since I was using the 'iframe' attribute, that the DOCTYPE should be Frameset.Thanks,LifeInBinary.
Link to comment
Share on other sites

Here is another problem that I have run into. I know about nesting tables for layouts being a bad idea, but it's how I did this one - and it needs to validate.Here is the code:

<!DOCTYPE htmlPUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>McKeon & Associates LTC</title><meta name="robots" content="index" /><meta name="author" content="James C. Williams II" /><meta name="copyright" content="Copyright © 2007 McKeon & Associates" /><meta http-equiv="content-language" content="en-US" /><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><meta name="description" content="Long Term Care Insurance with McKeon & Associates" /><meta name="revised" content="James C. Williams II, 03/14/07" /><meta name="keywords" content="john, mckeon, associates, longterm, care, insurance, certified, senior, advisor, csa, national, ethics, bureau, approved, neb" /><meta http-equiv="imagetoolbar" content="no" /><link rel="stylesheet" type="text/css" href="global.css" /><script type="text/javascript" src="security_1.js"></script><script type="text/javascript" src="security_3.js"></script></head><body class="bg"><script type="text/javascript" src="security_2.js"></script><center><table border="0" cellspacing="0" cellpadding="0"><tr>  <td colspan="2" width="820" height="170"><!--BEGIN TABLE A--><table border="0" cellspacing="0" cellpadding="0"><tr>  <td><img src="images/mckeon_left.jpg" alt="" /></td>  <td><img src="images/mckeon.jpg" alt="McKeon & Associates" /></td>  <td><img src="images/mckeon_right.jpg" alt="" /></td></tr><tr>  <td colspan="3"><img src="images/mckeon_bottom.jpg" alt="" /></td></tr></table><!--END TABLE A-->  </td></tr><tr>  <td rowspan="3" width="140" height="430"><!--BEGIN TABLE B--><table border="0" cellspacing="0" cellpadding="0"><tr>  <td rowspan="9"><img src="images/nav_left.jpg" alt="" /></td>  <td><img src="images/nav_john_mckeon.jpg" alt="John McKeon" /></td></tr><tr>  <td><img src="images/nav_spacer.jpg" alt="" /></td></tr><tr>  <td class="nav" width="130" height="22"><a href="home.html" target="showframe">Home</a></td></tr><tr>  <td class="nav" width="130" height="22"><a href="about.html" target="showframe">About Us</a></td></tr><tr>  <td class="nav" width="130" height="22"><a href="services.html" target="showframe">Services</a></td></tr><tr>  <td class="nav" width="130" height="22"><a href="resources.html" target="showframe">Resources</a></td></tr><tr>  <td class="nav" width="130" height="22"><a href="office.html" target="showframe">Office Information</a></td></tr><tr>  <td class="nav" width="130" height="22"><a href="contact.html" target="showframe">Contact Us</a></td></tr><tr>  <td><img src="images/nav_bottom.jpg" alt="" /></td></tr></table><!--END TABLE B-->  </td>  <td colspan="3" width="680" height="50"><!--BEGIN TABLE C--><table border="0" cellspacing="0" cellpadding="0"><tr>  <td><img src="images/motto_left.jpg" alt="" /></td>  <td class="motto" width="660" height="40">Planning Your Future<br />with Safety and Security in Mind</td>  <td><img src="images/motto_right.jpg" alt="" /></td></tr><tr>  <td colspan="3"><img src="images/motto_bottom.jpg" alt="" /></td></tr></table><!--END TABLE C-->  </td></tr><tr>  <td width="680" height="270"><!--BEGIN TABLE D--><table border="0" cellspacing="0" cellpadding="0"><tr>  <td><img src="images/iframe_left.jpg" alt="" /></td>  <td><iframe src="home.html" name="showframe" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" width="660" height="270"></iframe></td>  <td><img src="images/iframe_right.jpg" alt="" /></td></tr></table><!--END TABLE D-->  </td></tr><tr>  <td width="680" height="110"><!--BEGIN TABLE E--><table border="0" cellspacing="0" cellpadding="0"><tr>  <td><img src="images/csa_left.jpg" alt="" /></td>  <td><img src="images/csa.jpg" alt="CSA - Certified Senior Advisor" /></td>  <td class="certified" width="462" height="100">John McKeon is a Certified Senior Advisor<br />(CSA)<sup> ®</sup> and an approved member of the<br />National Ethics Bureau<sup> TM</sup></td>  <td><img src="images/neb.jpg" alt="NEB - National Bureau of Ethics" /></td>  <td><img src="images/neb_right.jpg" alt="" /></td></tr><tr>  <td colspan="5"><img src="images/certified_bottom.jpg" alt="" /></td></tr></table><!--END TABLE E-->  </td></tr><tr><!--BEGIN INFORMATION--><table border="0" cellspacing="0" cellpadding="0"><tr>  <td width="400" class="info_left">Copyright © 2007 McKeon & Associates</td>  <td width="400" class="info_right">Website Created By: James C. Williams II - 03/25/07</td></tr><tr>  <td width="400"></td>  <td width="400" class="info_right">Last Revised By: James C. Williams II - 03/25/07</td></tr></table><!--END INFORMATION--></tr></table></center></body></html>

And here is what the validator had to say:This page is not Valid XHTML 1.0 Transitional!Below are the results of checking this document for XML well-formedness and validity. ----------Error Line 134 column 49: document type does not allow element "table" here; missing one of "th", "td" start-tag.<table border="0" cellspacing="0" cellpadding="0">The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element. One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>"). ----------Error Line 146 column 4: end tag for "tr" which is not finished.</tr>Most likely, You nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p> Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, <head> generally requires a <title>, lists (ul, ol, dl) require list items (li, or dt, dd), and so on. This should actually be the last question I have for this. My validation is going exceptionally well :)Thanks for the help,LifeInBinary.

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...