有効な doctype を使用しようとしていますが、以下のものを URL とともに使用すると、リンク#ffffff
は 200 幅のテーブルで割り当てられたテキストの色を維持することを拒否します (そして) 背景色は 2 つの行全体をワイプします (両方ともgoogle と yahoo のリンク)。Doctype URL をコメントアウトすると、正常に動作します...これについて洞察を得ることができますか?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>test.com</title>
<style type="text/css">
td.off{background: #223C66}
td.on{background: #2d2dff}
</style>
<style>
a{text-decoration:none}
a:hover{text-decoration:underline}
</style>
</head>
<table width="600" align="center" style="border:10px solid black; border-collapse:collapse;" cellpadding="10" cellspacing="0">
<tr>
<td>
<table width="200" cellpadding="0" cellspacing="10" border="0">
<tr>
<td height="40" class="off" onmouseover="this.className='on'" onmouseout="this.className='off'">
<a href="http:\\www.google.com"><font color=#ffffff size=2 face=arial>valid google link</font></a>
</td>
</tr>
<tr>
<td height="40" class="off" onmouseover="this.className='on'" onmouseout="this.className='off'">
<a href="http://www.yahoo.com" target="_blank"><font color=#ffffff size=2 face=arial>valid yahoo link</font></a>
</td>
</tr>
</table>
</td>
<td style="border:1px solid black; border-collapse:collapse;" cellpadding="0" cellspacing="0">
<a href="http:\\www.msn.com">valid msn.com link</a>
<p>plain test - no link</p>
</td>
</tr>
</table>
</body>
</html>