Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm very new to web development.
i'm unable to understand , what kind of problem it is?
it is given.

Element "form" not allowed as child of element "table" in this context. (Suppressing further errors from this subtree.)

here is my code

XML
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" href="signupstyle.css" type="text/css">
        <link rel="stylesheet" href="DDM.css" type="text/css">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <div>
            <header id="header1" >
                <h1>Kids R Kids School</h1>
                <h4>Administrator</h4>
                <h4>Sign Up Page</h4>
            </header>
            <ul>
                <li onclick="window.open('index.html', '_self');" >Home</li>

                <li>Student
                    <ul>
                        <li>Web Design</li>
                        <li>Web Development</li>
                        <li>Illustrations</li>
                    </ul>
                </li>
                <li>Teacher</li>
                <li>Parent</li>
                <li>Contact</li>
                <li>Sign Up
                    <ul>
                        <li>New User</li>
                        <li>Sign In</li>
                        <li>Already Registered</li>
                    </ul>
                </li>
            </ul>
            <div id="MyMenu1"></div>
            <div id="body" >
                <table>
                    <form class="form-container" >
                        <div class="form-title"><h2>Sign up</h2></div>
                        <div class="form-title">Name</div>
                        <input class="form-field" type="text" name="firstname" /><br />
                        <div class="form-title">Email</div>
                        <input class="form-field" type="text" name="email" /><br />
                        <div class="submit-container">
                            <input class="submit-button" type="submit" value="Submit" onclick="window.open('signupaction.html', '_self');"/>
                        </div>
                        <input class="submit-button" type="button" value="Submittttt" onclick="window.open('signupaction.html', '_self');" >
                    </form>
                </table>

            </div>
            <footer id="footer1" >
                <button class="button" >Insert</button>
                <button class="button" >Reset</button>
                <button class="button" onclick="window.open('index.html', '_self');" >Admin Home</button>
            </footer>
        </div>
    </body>
</html>
Posted

1 solution

The error message is clear: you cannot make a "form" element a child of "table". It can be a child of "td" though.
Perhaps you just need to create table-like alignment for your form elements. There is a number of ways to achieve that, in particular, via CSS.

Table would help, too. You just need to make form element a parent element, and put the whole table as a child element of form. I think the rest of it should be clear.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900