I did xhtml for a music survey form and my page is not validating properly. All the elements are correct but it still will not validate at w3.org/validator. Please help me fix what needs to be changed in order for my page to validate. Thank you and God bless. Here is my code.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <!--Here is the head section I coded.--> <head> <title>Music Survey by Kelly Hadjiconstantinou</title> <link rel="stylesheet" href="music.css" type="text/css" media="screen" /> </head> <!--Here is the body section I coded. --> <body> <!--Code for h1 heading--> <h1>Music Survey</h1> <!--Here is the code for the beginning of form.--> <form method="get" action="http://www28.brinkster.com/cs2413/formHandler.asp" /> <!--Here is the coding for the table--> <table> <!--Coding for name and email.--> <tr> <td class="myLabel"><label for="myName">Name:</label> <input type="text" name="myName" id="myName" /></td> </tr> <tr> <td class="myLabel"><label for="myEmail">E-mail: </label> <input type="text" name="myEmail" id="myEmail" /></td> </tr> <tr> <!--Coding for "Select Your Favorite Types of Music" group--> <td><h3><br />Select Your Favorite Types of Music:</h3> <input type="checkbox" name="pop" id="pop" value="Yes" />Pop <input type="checkbox" name="classial" id="classical" value="Yes" />Classical</td> </tr> <tr> <td align="left" colspan="2"> <input type="checkbox" name="roc" id="roc" value="Yes" />Rock <input type="checkbox" name="fol" id="fol" value="Yes" />Folk<br /> </td> </tr> <tr> <td> <input type="checkbox" name="rap" id="rap" value="Yes" />Rap <input type="checkbox" name="other" id="other" value="Yes" />Other </td> </tr> <tr> <!--Code for "Purchase CDs" group--> <td><h3><br />Select how often you purchase music CDs:</h3> <input type="radio" name="Purhase" id="pw" value="Weekly" checked="checked" />Weekly <input type="radio" name="Purhase" id="pafcdey" value="A few CDs each year" />A few Cds each year<br /> <input type="radio" name="Purchase" id="pm" value="Monthly" />Monthly <input type="radio" name="Purchase" id="pnp" value="Never Purchase" />Never Purchase </td> </tr> <tr> <!--Code for "Locations group--> <td><h3><br />Select the locations you listen to CDs:</h3> <select size="3" name="location" id="location"> <option selected="selected">Select one or more locations</option> <option value="At home">At home</option> <option value="In the car">In the car</option> <option value="Music store">Music store</option> </select></td> </tr> <tr> <!--Code for "Music Question" group--> <td><h3><br />What role does music play in your life?</h3> <textarea name="myComment" id="myComment" cols="60" rows="3"></textarea></td> </tr> <tr> <!--Code for submit and reset buttons--> <td><br /> <input type="submit" value="Submit" /> <input type="reset" /></td> </tr> </table> </form> <!--Code for e-mail address--> <a href="mailto:kellyis4jc@msn.com">kellsyis4jc@msn.com</a> </body> </html>
These are the errors I received when validating.
Line 73, Column 7: end tag for element "form" which is not open
</form>✉
The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.
If this error occurred in a script section of your document, you should probably read this FAQ entry.
Line 73, Column 7: XML Parsing Error: Opening and ending tag mismatch: body line 11 and form
</form>✉
Line 76, Column 7: XML Parsing Error: Opening and ending tag mismatch: html line 4 and body
</body>
This post has been edited by JesusLover05: 02 November 2009 - 11:07 AM

New Topic/Question
Reply



MultiQuote




|