只有一半的图像显示出来。为什么?

时间:2013-02-18 06:19:07

标签: html

我想要显示四个图像 - 第一行有两个,下面有两个。

由于某些原因,只有顶行显示,我只是看不清楚原因。

这是非常简单的代码:

<img class="social" src="http://www.c5d.co.uk/racenight.png" alt="Race Night">
<img class="social2" src="http://www.c5d.co.uk/mothersday.png" alt="Mothers' Day>
<p>
<img class="social" src="http://www.c5d.co.uk/carlosax.png" alt="Carlo Sax>
<img class="social2" src="http://www.c5d.co.uk/eastersunday.png" alt="Easter Sunday"></p> 

网页为:http://www.c5d.co.uk/socialeventsfour.php

为什么不显示下面的两个图像?

2 个答案:

答案 0 :(得分:1)

因为您忘记关闭第二个和第三个"Mothers' Day上的"Carlo Sax<img>

以下是更正后的内容:

http://jsfiddle.net/ytmvy/2/

<img class="social" src="http://www.c5d.co.uk/racenight.png" alt="Race Night">
<img class="social2" src="http://www.c5d.co.uk/mothersday.png" alt="Mothers' Day">
<p>
    <img class="social" src="http://www.c5d.co.uk/carlosax.png" alt="Carlo Sax">
    <img class="social2" src="http://www.c5d.co.uk/eastersunday.png" alt="Easter Sunday">
</p>

答案 1 :(得分:1)

<img class="social" src="http://www.c5d.co.uk/racenight.png" alt="Race Night" />
<img class="social2" src="http://www.c5d.co.uk/mothersday.png" alt="Mothers' Day" />
<p>
  <img class="social" src="http://www.c5d.co.uk/carlosax.png" alt="Carlo Sax" />
  <img class="social2" src="http://www.c5d.co.uk/eastersunday.png" alt="Easter Sunday" />
</p>

使用图片时可以使用/>img)。以及"属性中明显丢失的alt

相关问题