0

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>
4

1 回答 1

1

你需要有这个 div 的结束标签,你错过了

<div class="form-input-set-1">

使用一些不错的代码编辑器,比如记事本++,会让你免于头痛

尝试这个

<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>
于 2013-04-25T09:25:19.833 回答