2011-12-31 77 views
1

有人能向我解釋什麼,我得到,我爲我的網站驗證錯誤:驗證:解釋原因

Line 33, Column 216: Self-closing syntax (/>) used on a non-void HTML element. Ignoring the slash and treating as a start tag. 
…ilto:?subject=E-mail%20from%20.co.nz">e-mail</a>.<p/> 

Line 43, Column 72: Element a not allowed as child of element ul in this context. (Suppressing further errors from this subtree.) 
…www.twitter.com/" title="Follow me on Twitter"><li class="twitter"></li></a> 

代碼:

<p>Text<a href="mailto:"">e-mail</a>.</p> 

      <div id="socialMedia"> 
       <ul> 
        <a href="http://www.twitter.com/"title="Follow me on Twitter"><li class="twitter"></li></a> 
        <a href="http://www.facebook.com/" title="Like me on Facebook"><li class="facebook"></li></a> 

li班級與顯示並可點擊的圖片鏈接

回答

4

您需要切換您的<a>標籤和<li>標籤; <li>應位於外部,並且是<ul>內唯一允許的元素。

<div id="socialMedia"> 
       <ul> 
        <li class="twitter"><a href="http://www.twitter.com/" title="Follow me on Twitter"></a></li> 
        <li class="facebook"><a href="http://www.facebook.com/" title="Like me on Facebook"></a></li> 

沒有看到什麼是你的位點的33線或者也許是幾行以前席前,很難說自閉標籤錯誤是什麼;它看起來像你在a標籤上直接使用/>,而不是單獨關閉</a>