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

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
Who is Participating?
tlaytonConnect With a Mentor Commented:
Works fine on my side, what browser are you using and what exactly are you clicking to get that error?
mmalik15Author Commented:
i m getting this error on both IE 9.0 and firefox 7.0.1
Don't know what to tell you, that URL opens fine in my FireFox 7.0.1...
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

mmalik15Author Commented:
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
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.
mmalik15Author Commented:
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.
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:

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

Pkease site your source for this. Otherwise it just sounds like noise.
mmalik15Author Commented:
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

>>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?
>>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?
>>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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.