narjis Posted September 4, 2012 Share Posted September 4, 2012 Is it necessary to have a form outside a table in other words if we write a table line before a form in html is it wrong? Please let me know. Link to comment https://forums.phpfreaks.com/topic/267976-small-question/ Share on other sites More sharing options...
requinix Posted September 4, 2012 Share Posted September 4, 2012 You can put FORMs outside TABLES and inside TDs/THs. You can't put them (directly) inside THEADs/TBODYs/TFOOTs or TRs. Link to comment https://forums.phpfreaks.com/topic/267976-small-question/#findComment-1375065 Share on other sites More sharing options...
narjis Posted September 4, 2012 Author Share Posted September 4, 2012 thank u Link to comment https://forums.phpfreaks.com/topic/267976-small-question/#findComment-1375108 Share on other sites More sharing options...
Christian F. Posted September 4, 2012 Share Posted September 4, 2012 However, you have to nest them properly, and keep in mind what's the legal tags within the different tags. For instance, this is incorrect as the form element cannot be a direct descendant of the table element, and the tr element cannot be a direct descendant element of the form element. <table> <form> <tr> <td><input ....></td> If you want to have input elements divided over multiple table cells/rows, then you need to place the form element outside of the table. Link to comment https://forums.phpfreaks.com/topic/267976-small-question/#findComment-1375175 Share on other sites More sharing options...
narjis Posted September 5, 2012 Author Share Posted September 5, 2012 thanks a lot Thank GOD I didn't argue on this with my colleague. Link to comment https://forums.phpfreaks.com/topic/267976-small-question/#findComment-1375326 Share on other sites More sharing options...
Christian F. Posted September 5, 2012 Share Posted September 5, 2012 You're welcome, glad we could help. Link to comment https://forums.phpfreaks.com/topic/267976-small-question/#findComment-1375349 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.