Solved

nested html tables causes w3c compliant error

Posted on 2004-09-14
2
221 Views
Last Modified: 2013-12-03
Hi!

I have removed most of the text below for readibility.

When I run the w3c validator against this code I only get one error, but the solution is eluding me.

Here is the error:

document type does not allow element "TABLE" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
...le width="348" align="center" border="0" id="table4">
----------------------------------------------------------------------------------------------------------------------------

<table cellSpacing="0" cellPadding="0" width="600" align="center" border="0" id="table1">
   <tr>
      <td>
          <table class="outerborder" cellSpacing="0" cellPadding="0" width="600" align="center" bgColor="#ffffff" border="0" id="table2">
       <tr>
           <td align="center">
                 <table cellSpacing="0" cellPadding="0" width="90%" border="0" id="table3">
            <tr>
                <td class="ver11"><font face="Arial"><b>Service Level Agreement</b></font>
                   <p>&nbsp;</p>
                  <font face="verdana" size="1">
                               <table width="348" align="center" border="0" id="table4">
                         <tr>
                                  <td>
                                      <font face="Verdana, Arial, Helvetica, sans-serif" size="2">
                                        Website Availability</font></td>
                        <td>
                        <font face="Verdana, Arial, Helvetica, sans-serif" size="2">
                        Credit Percentage</font></td>
                                   </tr>
                          <tr>
                        <td><font size="2">95% to 100%</font></td>
                        <td><font size="2">0%</font></td>
                                                       </tr>
                          <tr>
                        <td><font size="2">90% to 94.9%</font></td>
                        <td><font size="2">10%</font></td>
                                                             </tr>
                                 <tr>
                                          <td><font size="2">85% to 89.9%</font></td>
                        <td><font size="2">25%</font></td>
                                    </tr>
                                                <tr>
                                 <td><font size="2">80% to 84.9%</font></td>
                        <td><font size="2">50%</font></td>
                   </tr>
                  <tr>
                        <td><font size="2">79.9% or below</font></td>
                        <td><font size="2">100%</font></td>
                  </tr>
                  </table>
                  </font>
                  <p>&nbsp;</p></td>
                  </tr>
            </table>
                </td>
       </tr>
   </table>
    </td>
    </tr>
</table>

Thank you in advance.


0
Comment
Question by:TrueBlue
2 Comments
 
LVL 6

Accepted Solution

by:
Leviter earned 500 total points
Comment Utility
The problem lies above the table definition.... You open a font-tag there, but the 'font' element is an inline element. As a result of this, you cannot put any block-level elements such as 'p' and 'table' in it. Remove the font-tag above the 'table' tag and you're safe.
0
 
LVL 18

Expert Comment

by:Eternal_Student
Comment Utility
all font types/size/colors etc should be put in a css style and linked to the cell or table by class.
You have a lot of code here that could and should be put in css.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
HTML5 and Javascript 3 36
JavaScript communication inside a IFRAME 9 46
Flexbox in CSS3 2 23
CSS grid style change 2 13
Do you want to insert HTML5 video into your site? This is the tutorial how to do so. What are the main advantages of HTML5 video? 1) Have good compression, good image quality, and low decode processor use. 2) It is royalty-free 3) It is easi…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now