w3c validation error- document type does not allow element "table" here; missing one of "object"

Posted on 2011-10-25
Medium Priority
Last Modified: 2012-05-12
My webpage url where  i m using asp.net Treeview control is giving me the following validation error but i could not figure out how to sort it out for last hour or so

http://www.practicelifeintheuktest.co.uk/Book.aspx and i m getting the following

document type does not allow element "table" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
Question by:mmalik15
  • 6
  • 4
  • 2

Accepted Solution

tlayton earned 2000 total points
ID: 37027746
Works fine on my side, what browser are you using and what exactly are you clicking to get that error?

Author Comment

ID: 37027792
i m getting this error on both IE 9.0 and firefox 7.0.1

Expert Comment

ID: 37027812
Don't know what to tell you, that URL opens fine in my FireFox 7.0.1...
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Author Comment

ID: 37027827
strangly when i validate it with direct html input it validates fine but when i try to validate by URI i get the error above

Expert Comment

ID: 37027856
tbh w3c validators are still fallible, if the application is working on the browsers you have tested and it is not validating on there it is often just that they are taking every w3c rule into consideration while browsers are usually a lot more fogiving, I find that using something like Safari to test can be good as it is stricter than other browsers.

I have a feeling that the problem here is the use of tables at all, tables will eventually be deprecated in favour of divs and iframes etc.

Author Comment

ID: 37027869
i dont  have safari to test. could you kindly test on that and let me know. Also i m not creating tables, they are created as result of asp.net treeview control rendering.

Expert Comment

ID: 37027911
Ah yes well it is going to be nigh impossible to get a perfect w3c validation while using the treeview control! If you absolutely have to have it then Javascript for the menu is the way forward, personally I wouldn't worry too much as long as the site is working...

I don't actually have Safari on this laptop, you can grab it here though:

LVL 29

Expert Comment

ID: 37028301
>>tables will eventually be deprecated in favour of divs and iframes etc.

Pkease site your source for this. Otherwise it just sounds like noise.

Author Comment

ID: 37028309
I agree to you on the use of tables. But i m getting this erorr using asp.net tree view control. see attached code
<asp:TreeView ID="TreeView1" runat="server"  
                                            ImageSet="WindowsHelp" Font-Bold=false BorderColor="#282872" ForeColor="#0B2651"  
                                            BorderStyle="Solid" BorderWidth="0px" Width=100%>
            <asp:TreeNode Text="Chapter 2" Value="Chapter 2" NavigateUrl="~/Chapter2/chapter2.section1.aspx" >
                <asp:TreeNode NavigateUrl="~/Chapter2/chapter2.section1.aspx" Text="Chapter 2 Section-1"
                    Value="Chapter 2 Section-1"></asp:TreeNode>
                <asp:TreeNode NavigateUrl="~/Chapter2/chapter2.section2.aspx" Text="Chapter 2 Section-2"
                    Value="Chapter2 Section-2"></asp:TreeNode>
                      <asp:TreeNode NavigateUrl="~/Chapter2/chapter2.section3.aspx" Text="Chapter 2 Section-3"
                    Value="Chapter2 Section-2"></asp:TreeNode>

             <asp:TreeNode Text="Chapter 3" Value="Chapter 3" NavigateUrl="~/Chapter3/chapter3.section1.aspx" >
                <asp:TreeNode NavigateUrl="~/Chapter3/chapter3.section1.aspx" Text="Chapter 3 Section-1"
                    Value="Chapter 3 Section-1"></asp:TreeNode>
                <asp:TreeNode NavigateUrl="~/Chapter3/chapter3.section2.aspx" Text="Chapter 3 Section-2"
                    Value="Chapter3 Section-3"></asp:TreeNode>
                      <asp:TreeNode NavigateUrl="~/Chapter3/chapter3.section3.aspx" Text="Chapter 3 Section-3"
                    Value="Chapter3 Section-3"></asp:TreeNode>

             <asp:TreeNode Text="Chapter 4" Value="Chapter 4"  NavigateUrl="~/Chapter4/chapter4.section1.aspx">
                <asp:TreeNode NavigateUrl="~/Chapter4/chapter4.section1.aspx" Text="Chapter 4 Section-1"
                    Value="Chapter 4 Section-1"></asp:TreeNode>
                <asp:TreeNode NavigateUrl="~/Chapter4/chapter4.section2.aspx" Text="Chapter 4 Section-2"
                    Value="Chapter4 Section-2"></asp:TreeNode>

            <asp:TreeNode Text="Chapter 5" Value="Chapter 5" NavigateUrl="~/Chapter5/chapter5.section1.aspx">
                <asp:TreeNode NavigateUrl="~/Chapter5/chapter5.section1.aspx" Text="Chapter 5 Section-1"
                    Value="Chapter 5 Section-1"></asp:TreeNode>
                <asp:TreeNode NavigateUrl="~/Chapter5/chapter5.section2.aspx" Text="Chapter 5 Section-2"
                    Value="Chapter5 Section-2"></asp:TreeNode>
                      <asp:TreeNode NavigateUrl="~/Chapter5/chapter5.section3.aspx" Text="Chapter 5 Section-3"
                    Value="Chapter5 Section-3"></asp:TreeNode>
                    <asp:TreeNode NavigateUrl="~/Chapter5/chapter5.section4.aspx" Text="Chapter 5 Section-4"
                    Value="Chapter5 Section-4"></asp:TreeNode>
                    <asp:TreeNode NavigateUrl="~/Chapter5/chapter5.section5.aspx" Text="Chapter 5 Section-5"
                    Value="Chapter5 Section-5"></asp:TreeNode>

                    <asp:TreeNode NavigateUrl="~/Chapter5/chapter5.section6.aspx" Text="Chapter 5 Section-6"
                    Value="Chapter5 Section-6"></asp:TreeNode>

                    <asp:TreeNode NavigateUrl="~/Chapter5/chapter5.section7.aspx" Text="Chapter 5 Section-7"
                    Value="Chapter5 Section-7"></asp:TreeNode>


             <asp:TreeNode Text="Chapter 6" Value="Chapter 6" NavigateUrl="~/Chapter6/chapter6.section1.aspx">
                <asp:TreeNode NavigateUrl="~/Chapter6/chapter6.section1.aspx" Text="Chapter 6 Section-1"
                    Value="Chapter 6 Section-1"></asp:TreeNode>
                <asp:TreeNode NavigateUrl="~/Chapter6/chapter6.section2.aspx" Text="Chapter 6 Section-2"
                    Value="Chapter6 Section-2"></asp:TreeNode>
                      <asp:TreeNode NavigateUrl="~/Chapter6/chapter6.section3.aspx" Text="Chapter 6 Section-3"
                    Value="Chapter6 Section-3"></asp:TreeNode>
                    <asp:TreeNode NavigateUrl="~/Chapter6/chapter6.section4.aspx" Text="Chapter 6 Section-4"
                    Value="Chapter6 Section-4"></asp:TreeNode>
                    <asp:TreeNode NavigateUrl="~/Chapter6/chapter6.section5.aspx" Text="Chapter 6 Section-5"
                    Value="Chapter6 Section-5"></asp:TreeNode>



        <NodeStyle Font-Names="Verdana" Font-Size="10pt" ForeColor="Black" HorizontalPadding="5px"
            NodeSpacing="5px" VerticalPadding="1px" />
        <ParentNodeStyle Font-Bold="False" />
        <SelectedNodeStyle BackColor="#B5B5B5" Font-Underline="False" HorizontalPadding="0px"
            VerticalPadding="0px" />

Open in new window


Expert Comment

ID: 37029457
>>Pkease site your source for this. Otherwise it just sounds like noise.

It is common knowledge that CSS won the Table vs CSS war a good while back, since you have far more control over the layout with it, from the official w3 site:


The pertinent line being: "Tables should not be used purely as a means to layout document content as this may present problems when rendering to non-visual media. Additionally, when used with graphics, these tables may force users to scroll horizontally to view a table designed on a system with a larger display. To minimize these problems, authors should use style sheets to control layout rather than tables."

I am not saying <table> will be deprecated in 1 week or even 2 years but it is surely only a matter of time...

OT: I don't see which error you are getting mmalik15?
LVL 29

Expert Comment

ID: 37029497
>>but it is surely only a matter of time...

Perhaps not. Tables are indispensible for tabular data. Consider a grid of 1000 chemical compounds in a 100 x 10 grid. Which would you prefer to code: a single table or 1,000 DIVs?

I'll take a single table anyday.

I do not think the <table> tag will ever be deprecated. Think of the mayhem that would cause?

Expert Comment

ID: 37029832
>>Which would you prefer to code: a single table or 1,000 DIVs?

Let's be honest though, you would never hand-code those divs and when you are generating code it makes little difference imo.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
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)
Suggested Courses

840 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