Solved

nested html tables causes w3c compliant error

Posted on 2004-09-14
2
225 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

696 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