驗證我的網站時出現100錯誤。我不想繼續構建,直到我解決這個問題。我已經逐行了,我不明白爲什麼我有這些問題。粗略起草頁面在www.flynntec.com。一個例子錯誤:其次文檔類型不允許元素問題
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
樣本HTML
document type does not allow element "h3" here; assuming missing "li" start-tag [XHTML 1.0 Transitional]
或
document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag [XHTML 1.0 Transitional]
:
<li class="menu_right"><a href="#" class="drop">Access</a>
<div class="dropdown_5columns align_right">
<div class="col_5">
<h2>Microsoft Access</h2>
</div>
<div class="col_1">
<img src="media/Access Logo.png" width="120" height="118" alt="Microsoft Access" />
</div>
<div class="col_1">
<ul class="greybox"><h3>Beginner</h3><li><a href="#">Welcome to Access</a></li>
<li><a href="#">The Power of Access</a></li>
<li><a href="#">Intro to Databases</a></li>
<li><a href="#">Intro to Tables</a></li>
<li><a href="#">Creating Forms</a></li>
<li><a href="#">More...</a></li>
</ul>
</div>
<div class="col_1">
<ul class="greybox"><h3>Intermediate</h3><li><a href="#">Custom Queries</a></li>
<li><a href="#">Create Reports</a></li>
<li><a href="#">Primary Key Guide</a></li>
<li><a href="#">Filtering Quickly</a></li>
<li><a href="#">More...</a></li>
</ul>
</div>
<div class="col_1">
<ul class="greybox"><h3>Advanced</h3><li><a href="#">Web Integration</a></li>
<li><a href="#">Advanced Forms</a></li>
<li><a href="#">Using Triggers</a></li>
<li><a href="#">Shortcuts</a></li>
<li><a href="#">Expression Builder</a></li>
<li><a href="#">More...</a></li>
</ul>
</div>
<div class="col_5">
<h2>Additional Free Resources</h2>
</div>
<div class="col_3">
<img src="media/youtube-logo.jpg" alt="YouTube Picture" name="youtube" width="90" height="70" class="img_left imgshadow" id="youtube_logo_2" />
<p>Microsoft Access is an ideal small-business database engine. YouTube is a great source for Access guides. We have compiled the best, most popular Access tutorials from YouTube and put them here for your convenience. </p>
<br />
<a href="http://office.microsoft.com/en-us/training-FX101782702.aspx" target="_blank"><img src="media/microsoft-logo__111129012732.jpg" alt="" name="microsoft" width="90" height="24" class="img_left imgshadow" id="microsoft_logo_2" /></a>
<p><a href="http://office.microsoft.com/en-us/training-FX101782702.aspx" title="Microsoft Training" target="_blank">Microsoft has fantastic resources on their website. Microsoft Training can be found here.</a></p>
</div>
</div>
</li>
是的,有被打開和關閉UL的。
爲什麼XHTML嚴格的文檔類型?有必要嗎?你能用HTML5 doctype <!DOCTYPE html>嗎? – danludwig
我從來沒有考慮過它 - 什麼是適當的語法使用? – jdflynn55
<!DOCTYPE html>< - 將此作爲第一行,您當前的文檔類型是。 – danludwig