0

Please help me to add the submit option to this and pls tell wether it is correct or not.

<body> <h3>Admisson form </h3> <form> <label> Name:</label> <input type="text""name"> <br><br> <label>Address:</label><br> <textarea>"Type your Address here" placeholder:</textarea> <br><br> <label>Standered:</label> <select name="standred"</select> <option value 3s>3rd</option> <option value 4s>4th</option> <option value 5s>5th</option> <option value 6s>6th</option> <option value 7s>7th</option> <option value 8s>8th</option> <option value 9s>9th</option> <option value 10s>10th</option> <br><br> <label>Gender:</label> <select name:Gender> <option value>Male</option> <option value>Female</option> </form> </body>

30th Sep 2020, 10:43 AM
ATHARV SONAWANE
ATHARV SONAWANE - avatar
2 Réponses
+ 2
That is not correct. There are several problems with it. Below is a lot better. I'm using HTML5 because XHTML is a little outdated and your unclosed br tags indicate that you were leaning toward HTML5 anyway: <!DOCTYPE html> <html lang="en"> <head> <title>Form</title> </head> <body> <h3>Admisson form </h3> <form> <label for="name">Name:</label> <input id="name" type="text" placeholder="name"> <br><br> <label for="address">Address:</label><br> <textarea id="address" placeholder="Type your Address here"></textarea> <br><br> <label for="stand">Standered:</label> <select id="stand" name="standred"> <option value="3s">3rd</option> <option value="4s">4th</option> <option value="5s">5th</option> <option value="6s">6th</option> <option value="7s">7th</option> <option value="8s">8th</option> <option value="9s">9th</option> <option value="10s">10th</option> </select> <br><br> <label for="gender">Gender:</label> <select name="Gender" id="gender"> <option>Male</option> <option>Female</option> </select> <div> <button type="submit"> </div> </form> </body> </html> Some specific corrections are: - ended select element after option list. The original code either never closed the select element or did it too soon. - corrected various attribute-related errors. For example "option value 8s>". You want option value="8s"> - put placeholders in the placeholder attribute. The initial value of a textarea shouldn't be its placeholder. - added a submit button so the form could be submitted. - added id and for attributes so the labels would link to the corresponding input, select, or textarea. - indented properly. This is pretty minor. - added the html and body elements to clarify that they are needed. "Standered" looks misspelled. Did you mean "Standard"?
30th Sep 2020, 9:25 PM
Josh Greig
Josh Greig - avatar
0
Thank you so much
1st Oct 2020, 3:13 AM
ATHARV SONAWANE
ATHARV SONAWANE - avatar