2010-06-10 48 views
1

爲什麼顯示W3C驗證錯誤的代碼「字符數據在這裏不允許」爲什麼這段代碼在W3C驗證器中顯示錯誤?

<blockquote>all visible objects, man, are but as pasteboard masks. 
     But in each event -- in the living act, the undoubted 
     deed -- there, some unknown but still reasoning thing 
     puts forth the mouldings of its feature from behind 
     the unreasoning mask. If man will strike, strike 
     through the mask. All visible objects, man, are but as pasteboard masks. 
     But in each event -- in the living act, the undoubted 
     deed -- there, some unknown but still reasoning thing 
     puts forth the mouldings of its feature from behind 
     the unreasoning mask. If man will strike, strike 
     through the mask.</blockquote> 

它不會給任何錯誤在此驗證http://www.onlinewebcheck.com/

+0

我從來沒有聽說過onlinewebcheck.com,但W3C驗證是權威之一。 – 2010-06-10 16:19:10

回答

1

一個是不應該直接包含文本。在您驗證之前,您需要將文字封裝在一個p標籤或p標籤系列中。

3

您不能將文本放在<blockquote>標記中。你必須把它包起來的另一個元素,如<p>標籤:

<blockquote> 
    <p>My text.</p> 
</blockquote> 
0

注:爲了驗證塊引用元素作爲嚴格的HTML/XHTML,元素只能包含其他塊級元素,像這樣:

<塊引用> <p>這裏是這裏長的引用是一個長期的報價</p > < /塊引用>

來源:w3schools.com

+1

神聖的廢話,一個w3schools頁面,實際上有準確和有用的信息! – DisgruntledGoat 2010-06-11 12:00:06