2010-10-07 44 views
0

爲什麼標記驗證器說它在下面的html代碼中有錯誤?HTML Vs標記驗證服務:屬性構造錯誤

Line 287, Column 80: attributes construct error 

…ion" value="set=1&amp;page=2" /><ul><li><a href="http://campusfaithhub.org/vie… 

http://validator.w3.org/check?uri=http%3A%2F%2Fcampusfaithhub.org%2Ffood%2Ffood-should&charset=%28detect+automatically%29&doctype=Inline&ss=1&outline=1&group=0&No200=1&verbose=1&user-agent=W3C_Validator%2F1.1

<div id="pagination"> 
    <!-- add this to fix IE whitespace bug. IE sees a space inside an empty div, and applies line-height to it. The div will then be expanded in IE6 (and older) to accommodate this space. There's your gap. Simplest solution is to make sure IE6 understands that the empty div really _is_ empty, by putting a comment inside it and make sure there's no line-break. --> 
    <input type="hidden" class="last-pagination" value="set=1&amp;page=2" /> 
    <ul> 
     <li><a href="http://campusfaithhub.org/views/includes/layouts/items_comment.php?set=1&amp;page=1"class="current-pagination" rel="1">1</a></li> 
     <li><a href="http://campusfaithhub.org/views/includes/layouts/items_comment.php?set=1&amp;page=2" rel="1">2</a></li> 
    </ul> 
</div> 
<!--pagination--> 

我有一個隱藏的輸入字段來存儲一些信息。如果我拿出來,它仍然有錯誤驗證!我找不到其他任何東西來解決 - 你能看到我做錯了嗎?謝謝!

回答

2

編輯:看您的實際頁面的源代碼後,我看這個問題?

<input type="hidden" class="last-pagination" value="set=1&amp;page=2" /><ul><li><a href="http://campusfaithhub.org/views/includes/layouts/items_comment.php?set=1&amp;page=1"class="current-pagination" rel="1">1</a></li><li><a href="http://campusfaithhub.org/views/includes/layouts/items_comment.php?set=1&amp;page=2" rel="1">2</a></li></ul></div> 

具體做法是:頁= 1「級=」當前

你需要之間的空間結束引用和開放屬性標記。

+0

不用擔心在L和I之間沒有空白,因爲您可以從輸出中看到它。謝謝。 – laukok 2010-10-07 16:49:24

+0

看我的編輯。謝謝。 – 2010-10-07 16:52:36

+0

現在'此文檔已成功檢查'。謝謝!從來不知道這個空間太重要了!謝謝! :-) – laukok 2010-10-07 17:03:49