我被教授要求使用http://validator.w3.org/這個網站來驗證我的HTML文件。它給了我錯誤。 第一個錯誤是:HTML家庭作業,沒有通過驗證,但顯示良好
Line 1, Column 1: no document type declaration; implying ""
第二個錯誤是:
Line 11, Column 64: required attribute "ALT" not specified ✉ The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element. Typical values for type are type="text/css" for and type="text/javascript" for .
誰能告訴什麼是錯?它在我的瀏覽器中顯示得很好,我正在使用IE 8。但是教授說,如果它在這個驗證檢查中失敗,那麼這個任務是不完整的。任何幫助都會很棒。
<html>
<head>
<title>Randy's first html web page !</title>
</head>
<body bgcolor="#000066" text="#00ff44">
<h1 align="center"> Hello Professor</h1>
<h2 align="center"> By: Randy White</h2>
<p> I haven't done anything like this before.</p>
<p> Seems to be ok</p>
<p align="center"><img src="Koala.gif" width="100" height="100">
<table border="1">
<tr>
<th>Month</th>
<th>Day</th>
<th>Year</th>
</tr>
<tr>
<td>December</td>
<td>1</td>
<td>2010</td>
</tr>
</table>
</body>
</html>
第1行第1列:序言中的文檔結尾 ✉ 驗證程序收到空白文檔時可能會出現此錯誤。請確保您上傳的文件不是空的,並報告任何差異。 – user770022 2010-12-01 20:16:01