为什么这不会在这里验证的任何想法:
http://validator.w3.org/#validate_by_input
看起来表单输入标签是错误的,但通读 XHTML 规范它们应该可以正常验证。有什么想法吗?
<!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">
<head>
<title>Test</title>
</head>
<body>
<div class="Header">
<table class="HeaderTable">
<tr>
<td>
<div class="Heading">Test <span class="Standard">Test</span>
</div>
</td>
<td>
<div class="Controls">
<form id="ControlForm" method="get" action="Edit.php">
<input type="submit" name="action" id="Edit" value="Edit" />
<input type="submit" name="action" id="New" value="New" />
</form>
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
最佳答案
尝试在输入周围放置一个 fieldset
标签。我认为 XHTML 中的表单的想法是它们不能有不是 div、fieldset 等的直接后代。
关于validation - 为什么这个 XHTML 表单不能通过验证?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/253312/