W3C说我有一个未封闭的标签。 顺便说一句,它必须是XHTML
验证输出:1错误
第31行,第9列:省略了“div”的结束标记,但指定了OMITTAG NO ✉ 您可能忽略了关闭元素,或者您可能意图“自我关闭”元素,即以“/>”结束它而不是“>”。
第19行,第4列:开始标记在这里
这是我的xhtml:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<title>phpFormTemplate</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<script type="text/javascript" src="phpFormTempate/checkform.js"></script>
<link rel="stylesheet" type="text/css" href="phpFormTempate/css/default.css" />
</head>
<body>
<div id="errorContainer">
</div>
<div id="phpformtemplate">
<form action="/index.php" method="post" accept-charset="utf-8" enctype="application/x-www-form-urlencoded">
<div id="textrequired">*: Pflichtfelder</div>
<!-- begin input set n° 1 -->
<div class="form-input-set-1">
<span class="required-char">*</span>
<div class="form-input-label-1">
<label for="Bemerkung">Bemerkung</label>
</div>
<div class="form-input-1">
<textarea id="Bemerkung" tabindex="1" accesskey="B" name="Bemerkung" class="required" rows="10" cols="50">Default</textarea>
<div class="form-input-error-1">
<span id="error_Bemerkung"></span>
</div>
</div><!-- ISN'T IT THAT ONE? -->
<!-- iT CLOSES THE <div class="form-input-set-1"> -->
<!-- or am I wrong? pleas help!! -->
<!-- end input set n° 1 -->
</form>
</div>
<div id="errorContainer">
<ul class="error-list">
Es wurde keine E-Mail an den Besucher geschickt.
</ul>
<ul class="error-list">
Diese E-Mail wurde an daenuboehmle@gmail.com geschickt.
</ul>
</div>
</body>
</html>
答案 0 :(得分:1)
你需要有这个div的结束标记,你错过了
<div class="form-input-set-1">
使用一些不错的代码编辑器,如notepadd ++,可以避免这种头痛
试试这个
<head>
<title>phpFormTemplate</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<script type="text/javascript" src="phpFormTempate/checkform.js"></script>
<link rel="stylesheet" type="text/css" href="phpFormTempate/css/default.css" />
</head>
<body>
<div id="errorContainer">
<ul class="error-list">
Ihre Daten wurden bereits verschickt.
</ul>
</div>
<div id="errorContainer">
</div>
<div id="phpformtemplate">
<form action="/index.php" method="post" accept-charset="utf-8" enctype="application/x-www-form-urlencoded">
<div id="textrequired">*: Pflichtfelder</div>
<!-- begin input set n° 1 -->
<div class="form-input-set-1">
<span class="required-char">*</span>
<div class="form-input-label-1">
<label for="Bemerkung">Bemerkung</label>
</div>
<div class="form-input-1">
<textarea id="Bemerkung" tabindex="1" accesskey="B" name="Bemerkung" class="required" rows="10" cols="50"></textarea>
<div class="form-input-error-1">
<span id="error_Bemerkung"></span>
</div>
</div>
</div> <!-- You were missing close tag here -->
<!-- end input set n° 1 -->
</form>
</div>
</body>
</html>