Question : <img src="">

I was looking at the html source for a web page, and have come across this

   

What does the empty src attribute mean?

fwiw, the page I saw it on was http://www.football365.com/

Steve

Answer : <img src="">

If we take a snippet of code from that particular website:

<table cellspacing="0" cellpadding="0" border="0" width="100%">
      <tr class= "titleXSmall">
            <td valign="top"><img src="http://www.football365.com//mediastore/Design/arrow_blue.gif" border="0" hspace="3" vspace="3"></td>
      </tr>
      <tr class= "titleXSmall">
            <td colspan="2"><img src="" border="0" width="1" height="5"></td>
      </tr>
            <td class="titleXSmall"><a  href="http://www.football365.com//All_News/Breaking_News/story_82889.shtml" target="_self">FA Will Rule On Old Trafford Row Soon</a></a></td>
      </tr>
</table>

When they use <img src="" border="0" width="1" height="5"> this is to make a gap between the two rows of 5 pixels in height. It doesn't use an actual image and so loads fractionally quicker than using a transparent gif. But really the payoff is so minor you have to wonder why they bother especially when they use a single pixel gif elsewhere in the page.

Hope this helps,
Rei.
Random Solutions  
 
programming4us programming4us