Can someone tell me why the W3C Validation Service says that this code is not valid?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>this is the title of the web page</title>
</head>
<body>
<form action="formscript.php" method="post">
first name:<input type="text" name="firstname" />
<input type="submit" />
</form>
</body>
</html>
I tried both codes and the validator says that the question code is valid as XHTML 1.0 Transitional.
Anyway, the problem here is that you have no
<fieldset>inside your<form>and that the text<input>has no<label>.And don’t forget the
DOCTYPE.