Solved

nested html tables causes w3c compliant error

Posted on 2004-09-14
2
222 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
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

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP.net Fit 3 divs on screen side by side 3 28
maps stopped work unsure why 7 36
HTML Display Current Year 5 28
Get Pixel color of the x and y axis Html without canvas 8 38
Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

803 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