0

私はまだ初心者です。このエラーの意味が少しわかりません。

 Line 30, Column 5: document type does not allow element "li" here; missing one of "ul", "ol" start-tag

44行目までずっとこのエラーが発生しました

そして、この省略された意味は何ですか?

 Line 54, Column 7: end tag for "div" omitted, but OMITTAG NO was specified

以下は私のコードです:(誰かが私を導くことができれば感謝します

<!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" lang="en" xml:lang="en" >
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="description" content= "about" />
    <meta name="keywords" content="about" />
<title>About</title>
</head>  
    <body>
        <div id="container">
        <div id="inside">
        <div id="inside2">
        <h1>About</h1>
        <ul>
        <li>The Php version installed in mercury is <?php echo 'Current PHP version: ' . phpversion(); ?>.
        </li>
        <br />
        <li>The task I am not attempted is Task 5.
        </li>
        <br />
        <li>I am not exploring and implementing any special feature.</li>
        <br />
        <li>I have trouble mainly on Task 3 with validation.</li>
        <br />
        <li>Regarding with php, I want to gain more knowledge, I need to grasp deeper understanding on how everything works
        as there are a lot of things to remember and how things are working. The other part is I need to dramatically improve
        my time managment, although I start a week and half early, but I had trouble understanding the codes, and with other
        assignments I need to finish.</li>
        <br />
        <li>Youtube channel by the name phpacademy and thenewboston help me out to get clearer understanding about certain stuff
        in php, as well stackoverflow.com</li>
        <li>I have learn more and new codes, better understanding on how overall the code works in PHP, but still a lot to learn.</li>
        <br />
        <img src="thread.jpg" width="450" height="350" alt="Discussion Thread" />
        <br />
        <a href="index.php">Return to Homepage</a> 


        <ul>


    </body>
    </html>
4

5 に答える 5

1

あなたの<br/>タグは検証から外れています。それらを削除するか、少なくとも適切な要素内に配置してください。その他のエラーについては、タグを適切に閉じてください。

于 2012-09-26T00:52:36.067 に答える
0

これはより適切に検証されるはずです。

2 つの開始タグが<ul>あり、終了タグは 1 つもありませんでし</div>た。<br><li>

<!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" lang="en" xml:lang="en" >
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="description" content= "about" />
    <meta name="keywords" content="about" />
<title>About</title>
</head>
    <body>
        <div id="container">
          <div id="inside">
            <div id="inside2">
            <h1>About</h1>
            <ul>
              <li>The Php version installed in mercury is <?php echo 'Current PHP version: ' . phpversion(); ?>.</li>
              <li>The task I am not attempted is Task 5.</li>
              <li>I am not exploring and implementing any special feature.</li>
              <li>I have trouble mainly on Task 3 with validation.</li>
              <li>Regarding with php, I want to gain more knowledge, I need to grasp deeper understanding on how everything works
              as there are a lot of things to remember and how things are working. The other part is I need to dramatically improve
              my time managment, although I start a week and half early, but I had trouble understanding the codes, and with other
              assignments I need to finish.</li>
              <li>Youtube channel by the name phpacademy and thenewboston help me out to get clearer understanding about certain stuff
              in php, as well stackoverflow.com</li>
              <li>I have learn more and new codes, better understanding on how overall the code works in PHP, but still a lot to learn.</li>
            </ul>
            <img src="thread.jpg" width="450" height="350" alt="Discussion Thread" />
            <br>
            <a href="index.php">Return to Homepage</a>    
            </div>
          </div>
        </div>
</body>
</html>
于 2012-09-26T00:58:48.840 に答える
0

下部にある終了 ul タグを確認してください。そうであるように思われ、そうある<ul>べきです</ul>(終了タグの代わりに開始タグがあります)。

XHTML 1.0 Strict とは、まさにそれを意味することに注意してください...厳密です。

于 2012-09-26T00:52:09.093 に答える
0

最初のメッセージでは、すべて<li>の が の子である必要があります<ul>。2 番目のメッセージでは、3 つ<div>の を開きますが、決して閉じません。<br />も無効で冗長です。<li>s は自動的に改行します。HTML は次のように修正できます。

<!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" lang="en" xml:lang="en" >
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="description" content= "about" />
    <meta name="keywords" content="about" />
<title>About</title>
</head>  
<body>
    <div id="container">
    <div id="inside">
    <div id="inside2">
    <h1>About</h1>
    <ul>
    <li>The Php version installed in mercury is <?php echo 'Current PHP version: ' . phpversion(); ?>.
    </li>
    <li>The task I am not attempted is Task 5.</li>
    <li>I am not exploring and implementing any special feature.</li>
    <li>I have trouble mainly on Task 3 with validation.</li>
    <li>Regarding with php, I want to gain more knowledge, I need to grasp deeper understanding on how everything works
    as there are a lot of things to remember and how things are working. The other part is I need to dramatically improve
    my time managment, although I start a week and half early, but I had trouble understanding the codes, and with other
    assignments I need to finish.</li>
    <li>Youtube channel by the name phpacademy and thenewboston help me out to get clearer understanding about certain stuff
    in php, as well stackoverflow.com</li>
    <li>I have learn more and new codes, better understanding on how overall the code works in PHP, but still a lot to learn.</li>
    <li>
        <img src="thread.jpg" width="450" height="350" alt="Discussion Thread" />
        <a href="index.php">Return to Homepage</a>
    </li>
    </ul>
</div>
</div>
</div>
</body>
</html>
于 2012-09-26T00:50:06.283 に答える
0

</ul>最後の の後に before を置いてみてください</li>。次に、最後<div></div>... で閉じます。これでうまくいくはずです。また、すべての改行は不適切な書式設定であり、CSS を使用してこれらのスタイルを変更でき、ブラウザーとの互換性が高くなります。

于 2012-09-26T00:51:12.463 に答える