2011-04-15 34 views
1

爲什麼我的img標籤不能在IE8中工作?但IN ff?和鉻?<img>僅在IE8中標記錯誤?

validation Output: 2 Errors 

Line 17, Column 47: an attribute value literal can occur in an attribute specification list only after a VI delimiter 
"<img src="images/helhjartat_slutliga.jpg" alt"logga">" 
✉ 
Have you forgotten the "equal" sign marking the separation between the attribute and its declared value? Typical syntax is attribute="value". 

Line 17, Column 48: end tag for "img" omitted, but OMITTAG NO was specified 
"<img src="images/helhjartat_slutliga.jpg" alt"logga">" 
✉ 
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">". 

Line 17, Column 2: start tag was here 
"<img src="images/helhjartat_slutliga.jpg" alt"logga">" 

回答

1

你忘了平等和關閉標籤

<img src="images/helhjartat_slutliga.jpg" alt="logga" /> 

<img src="images/helhjartat_slutliga.jpg" alt="logga" /> 

<img src="images/helhjartat_slutliga.jpg" alt="logga" /> 
0

alt後失蹤等號和XHTML,你應該關閉approprietly img標籤:

<img src="images/helhjartat_slutliga.jpg" alt="logga" /> 
0

在猜測,您已將DOCTYPE設置爲嚴格的XHTML,這意味着您的img標記的格式不正確,請嘗試更改DOCTYPE到一個更寬鬆的版本,或者修改你的img標籤..

<img src="images/helhjartat_slutliga.jpg" alt="logga" /> 
0

首先你必須寫ALT = 「logga」,而不是ALT 「logga」

,其次你必須關閉你的標籤。

要麼關閉你直接通過用/>(任選地添加另外的空間)

,或者你提供的結束標記

爲什麼它在工作替換所述後>標記FF和Chrome? 因爲他們比慷慨得多 - 在這種情況下 - IE8

我希望這回答了你的問題;) 如果我得到你的問題錯了,請原諒我