Would it be wrong to have every form element wrapped in tags <form>on an HTML page? Curious why this would be wrong:
Basically, I have to introduce two forms ( form1and form2), and there are some elements associated with the first, and others with the second. The layout should be completely based on the table, and since the elements of both forms on the entire page are what I wrote (according to http://validator.w3.org/check , the code is valid):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Title of the document</title>
</head>
<body>
<table border="1">
<tr>
<td>
<form name="form1" method="POST" action="via.php">
Enter the first form text here!: <input type="text" name="first"/>
</form>
</td>
<td rowspan="2">
<form name="form2" method="POST" action="via.php">
Enter the second form text here!:<input type="text" name="second"/>
</form>
<form name="form1" method="POST" action="via.php">
Enter the first form text here!:<input type="text" name="first"/>
</form>
</td>
</tr>
<tr>
<td>
<form name="form1" method="POST" action="via.php">
<input type="submit" name="form1submit" value="submit1"/>
</form>
<form name="form12" method="POST" action="via.php">
<input type="submit" name="form2submit" value="submit2"/>
</form>
</td>
</tr>
</table>
tutak source
share