Background: I am writing a Java app which auto generates a HTML table. As well as adding table rows, this app may insert hidden inputs. However, at present it simply inserts them into the table at the next opportunity, for example:
<table>
<tr> ... </tr>
<input type="hidden" />
<tr> ... </tr>
</table>
So, my question: Is it valid HTML to insert a hidden input between rows like this, or is this likely to cause problems?
It's not valid.
<!ELEMENT TABLE - -
(CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>
No, it's not.
You should use the W3C validator and check by yourself your webpages : http://validator.w3.org/.
It's not valid.
From http://validator.w3.org/
Line 9, Column 27: document type does not allow element "input" here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With