?
Solved

nested html tables causes w3c compliant error

Posted on 2004-09-14
2
Medium Priority
?
228 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 2000 total points
ID: 12061861
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
ID: 12062479
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…

864 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