このページは、PHPスクリプトを介して生成されます。エラーメッセージは次のとおりです。
行14、列8:終了していない「tbody」の終了タグ
</tbody></table>
ほとんどの場合、タグをネストして、間違った順序で閉じました。たとえば、の前に閉じる必要がある
<p><em>...</p>
ため、受け入れられません。許容されるネストは次のとおりです。<em>
<p>
<p><em>...</em></p>
もう1つの可能性は、含めなかった子要素を必要とする要素を使用したことです。したがって、親要素は「完了していない」、完全ではありません。たとえば、HTMLでは、
<head>
要素に子要素が含まれている必要があり<title>
、リストには適切なリストアイテムが必要です(<ul>
および<ol>
require<li>
; require<dt>
and<dd>
)などです。
Google Chromeでソースを表示すると、私のコードは次のようになります。
<?xml version="1.0" encoding="UTF-8"?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="CSS/Index.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h3>Search Results</h3>
<table>
<tbody>
</tbody></table>
</body>
</html>
Firefoxでソースを表示すると、私のコードは次のようになります。
<?xml version="1.0" encoding="UTF-8"?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PcDescribeTable</title>
<link href="CSS/Index.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h3>Search Results</h3>
<table>
<tr><td>Intel i7-950 3.06GHz</td></tr>
<tr><td>WD 500GB 7200RPM SATA 6GBs</td></tr>
<tr><td>XFX Radeon HD 6870</td></tr>
<tr><td>CORSAIR 4GB DDR3 1600</td></tr>
<tr><td>ASUS P6X58D-E LGA 1366</td></tr>
<tr><td>CORSAIR Enthusiast Series 650W</td></tr>
<tr><td>VisonTek Bigfoot Killer</td></tr>
<tr><td>Creative Sound Blaster X-Fi HD</td></tr>
<tr><td>Razer Lycrosa</td></tr>
<tr><td>24x DVD Burner</td></tr>
<tr><td>Asus 23" Full HD LED</td></tr>
<tr><td>Razer Death Adder</td></tr>
</table>
</body>
</html>
そして、これはPHPスクリプトがどのように見えるかです:
<table>
<tbody>
<?php
for ( $counter = 0; $row = mysql_fetch_row( $result ); $counter++ )
{
print("<tr>");
foreach ( $row as $key => $value )
print( "<td>".$value."</td>");
print("</tr>");
}
print("</tbody>");
print("</table>");
mysql_close($database);
?>