<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>title</title>
</head>
<body>
<form action="next.php" method="post">
<input type="text" name="my_input">
</form>
</body>
</html>
views:
29answers:
2
+3
A:
Because according to this DTD inputs need to be nested in one of the following tags: P
, H1
, H2
, H3
, H4
, H5
, H6
, PRE
, DIV
, ADDRESS
:
<p>
<input type="text" name="my_input">
</p>
Darin Dimitrov
2010-09-25 09:47:30
Congrats on 100K :)
Mark Byers
2010-09-25 09:53:50
@Mark, thank you.
Darin Dimitrov
2010-09-25 09:54:38
+4
A:
The validator already told you the reasons.
document type does not allow element "INPUT" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag
Use
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>title</title>
</head>
<body>
<form action="next.php" method="post">
<p><input type="text" name="my_input"></p>
</form>
</body>
</html>
KennyTM
2010-09-25 09:47:34