2017-09-15 76 views
-4

這是我正在使用的代碼。出於某種原因,MSN.com下的所有內容都將成爲鏈接。我檢查了我的CSS,並且我假設問題出現在那裏,但是想要先看看它是從HTMl方面發生的事情。我寫的所有HTML都變得鏈接了(不使用hrefs)?

<a href="http:msn.com" target="blank"><img class="makeBlock" src="images/scenery.jpg" alt="This is a clickable image"></a><br><br> 
<!-- One way to utilize this functionality is to have a nice image button saved and use that to link to stuff --> 

<!-- An array of images that are thumbnail size that be clicked to go to a new window for the bigger version --> 
<a href="http://yahoo.com" target="blank"><img src="images/scenery.jpg" alt="thumbnail size to link" width="width 52" height="70"> 
<a href="http://yahoo.com" target="blank"><img src="images/scenery.jpg" alt="thumbnail size to link" width="width 52" height="70"> 
<a href="http://yahoo.com" target="blank"><img src="http://freeforcommercialuse.net/wp-content/uploads/2017/08/msp_1701_4269.jpg" alt="thumbnail size to link" width="width 52" height="70"> 
<a href="http://yahoo.com" target="blank"><img src="images/scenery.jpg" alt="thumbnail size to link" width="width 52" height="70"> 
<a href="http://yahoo.com" target="blank"><img src="images/scenery.jpg" alt="thumbnail size to link" width="width 52" height="70"> 
<a href="http://google.com" target="blank"><img src="images/scenery.jpg" alt="thumbnail size to link" width="width 52" height="70"> 

<br> 
<br> 

</div> 

<!-- The below is to create an image map using coordinats so people can click on different areas and go different places --> 

<img src="http://freeforcommercialuse.net/wp-content/uploads/2017/08/msp_1701_4269.jpg" usemap="#scenery"> 
<map name="scenery"> 
<area shape="rect" alt="Left side strong side" coords="0,10,536,614" href="https://nba.com" target="blank"> 
</map> 

<!-- An unordered list is called a bullet list. An ordered list is with numbers --> 

<ul> 
    <li>Sun</li> 
    <li>Moon</li> 
    <li>Test</li> 
</ul> 

<ol> 
    <li>Ordered Sun</li> 
    <li>Ordered Moon</li> 
    <li>Ordered Test</li> 
</ol> 

<table> 
    <tr> 
     <td>Apples R1C1</td> 
     <td>Oranges R1C2</td> 
    </tr> 
    <tr> 
     <td>Pears R2C1</td> 
     <td>Peaches R2C2</td> 
    </tr> 
</table> 

+0

歡迎來到Stack Overflow!投票結束,因爲這個問題是由於無法再現的問題或簡單的印刷錯誤造成的。雖然類似的問題可能在這裏討論,但這個問題的解決方式不太可能有助於未來的讀者。 –

回答

0

你缺少結束標記的所有定位元素。結構應該看起來像這樣<a></a>

或使用一個你的例子

<a href="http://google.com" target="blank"> 
    <img src="images/scenery.jpg" alt="thumbnail size to link" width="width 52" height="70"> 
</a> 
0

你有沒有在你的代碼關閉</a>正常。

+0

https://fiddle.jshell.net/n3u1cwx0/ – Santhosh

+0

謝謝! Jeez我知道這很簡單,我花了半個多小時嘗試一切,但除此之外。 – sundizz

0

你永遠不會用</a>來關閉你的元素。

相關問題