我正在尝试将我的文档验证为 XHTML 1.0 Transitional (W3C)。我有以下错误:文档类型在此处不允许元素“div”;缺少与此代码对应的“object”、“applet”、“map”、“iframe”、“button”、“ins”、“del”开始标签之一:
<div style="clear: both;"></div>
还有错误:文档类型在此处不允许元素“p”;缺少“object”、“applet”、“map”、“iframe”、“button”、“ins”、“del”开始标签之一
<p><span class="form-span">Do <input type="checkbox" name="own" value="yes" /> rent <input type="checkbox" name="rent" value="yes" /> other <input type="checkbox" name="rentother" value="Other" /></span></p>
代码片段:
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional
...
<body>
<form id="form1" ...>
...
<div style="clear: both;"></div>
<p><span class="form-span">Do <input type="checkbox" name="own" value="yes" /> rent <input type="checkbox" name="rent" value="yes" /> other <input type="checkbox" name="rentother" value="Other" /></span></p>
<div style="clear: both;"></div>
<span style="width:100%;">
...
<input id="i1oc_yes" type="radio" name="i1oc" value="yes" />
<input id="i1oc_no" type="radio" name="i1oc" value="no" />
...
<div style="clear: both;"></div>
...
</span>
请让我知道有什么问题。谢谢!