usman07 Posted March 9, 2012 Share Posted March 9, 2012 Basically i have used tables and used form tags to put everything in. why do i get a error saying "end tag for element form which is not opened" but it is opened? any help will be appreciated. HTML CODE <table id="tb1"> <tr> <td><p class="LOC">Location:</p></td> <td><div id="LC"> <form action="insert.php" method="post"> <select multiple="multiple" size="5" style="width: 150px;" > <option>Armley</option> <option>Chapel Allerton</option> <option>Harehills</option> <option>Headingley</option> <option>Hyde Park</option> <option>Moortown</option> <option>Roundhay</option> </select> </div> </td><td><p class="PT">Property type:</p></td> <td><div id="PS"> <select name="property type" style="width: 170px;"> <option value="none" selected="selected">Any</option> <option value="Houses">Houses</option> <option value="Flats / Apartments">Flats / Apartments</option> </select> </div> </td><td> <div id="ptype"> <input type="radio" class="styled" name="ptype" value="forsale"/> For Sale <p class="increase"> <input type="radio" class="styled" name="ptype" value="forrent"/> To Rent </p> <p class="increase"> <input type="radio" class="styled" name="ptype" value="any"/> Any </p> </div> </td> </tr> </table> <div id="table2"> <table id="NBtable"> <tr> <td><p class="NBS">Number of bedrooms:</p></td> <td><div id="NB"> <select name="number of bedrooms"> <option value="none" selected="selected">No Min</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> </select> to <select name="number of bedrooms"> <option value="none" selected="selected">No Max</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> </select> </div> </td> <td><p class="PR">Price range:</p></td> <td><div id="PR"> <select name="price range"> <option value="none" selected="selected">No Min</option> <option value="50,000">50,000</option> <option value="60,000">60,000</option> <option value="70,000">70,000</option> <option value="80,000">80,000</option> <option value="90,000">90,000</option> <option value="100,000">100,000</option> <option value="110,000">110,000</option> <option value="120,000">120,000</option> <option value="130,000">130,000</option> <option value="140,000">140,000</option> <option value="150,000">150,000</option> <option value="160,000">160,000</option> <option value="170,000">170,000</option> <option value="180,000">180,000</option> <option value="190,000">190,000</option> <option value="200,000">200,000</option> <option value="210,000">210,000</option> <option value="220,000">220,000</option> <option value="230,000">230,000</option> <option value="240,000">240,000</option> <option value="250,000">250,000</option> <option value="260,000">260,000</option> <option value="270,000">270,000</option> <option value="280,000">280,000</option> <option value="290,000">290,000</option> <option value="300,000">300,000</option> <option value="310,000">310,000</option> <option value="320,000">320,000</option> <option value="330,000">330,000</option> <option value="340,000">340,000</option> <option value="350,000">350,000</option> </select> to <select name="price range"> <option value="none" selected="selected">No Max</option> <option value="50,000">50,000</option> <option value="60,000">60,000</option> <option value="70,000">70,000</option> <option value="80,000">80,000</option> <option value="90,000">90,000</option> <option value="100,000">100,000</option> <option value="110,000">110,000</option> <option value="120,000">120,000</option> <option value="130,000">130,000</option> <option value="140,000">140,000</option> <option value="150,000">150,000</option> <option value="160,000">160,000</option> <option value="170,000">170,000</option> <option value="180,000">180,000</option> <option value="190,000">190,000</option> <option value="200,000">200,000</option> <option value="210,000">210,000</option> <option value="220,000">220,000</option> <option value="230,000">230,000</option> <option value="240,000">240,000</option> <option value="250,000">250,000</option> <option value="260,000">260,000</option> <option value="270,000">270,000</option> <option value="280,000">280,000</option> <option value="290,000">290,000</option> <option value="300,000">300,000</option> <option value="310,000">310,000</option> <option value="320,000">320,000</option> <option value="330,000">330,000</option> <option value="340,000">340,000</option> <option value="350,000">350,000</option> </select> </div> </td> </tr> </table> <input type="submit" value="submit" /> </form> </div> Quote Link to comment Share on other sites More sharing options...
cpd Posted March 9, 2012 Share Posted March 9, 2012 It looks like your opening up a form in a div tag which is inside a td tag and then trying to close it after you close your table tag. That's bad practice and as you've found out, breaks your HTML. Instead you should close the tags in the reverse order you went in. <!-- Correct HTML --> <div> <p> <span> Content </span> </p> </div> Unlike what you are trying to do <!-- Incorrect HTML --> <div> <p> <span> Content </p> </div> </span> Quote Link to comment Share on other sites More sharing options...
Stiver112 Posted March 15, 2012 Share Posted March 15, 2012 If you are in doubt another time, then just validate your site in W3validator or like...it will tell you exactly where your error is located Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.