close the IMG tag?

Discussion in 'Web Design' started by Zoid, Oct 27, 2008.

to remove all ads.
  1. Zoid

    Zoid New Member

    Messages:
    10
    If I wanted an image as a link would I do it like this?

    <a href="page.html"><img border="0" src="picture.gif" height="10" width="15"></a>

    ...without closing the <img> tag, or like this:


    <a href="page.html"><img border="0" src="picture.gif" height="10" width="15"></img></a>


    I am trying to make everything xhtml friendly. Thanks.
     
  2. suz

    suz New Member

    Messages:
    378
    <a href="page.html"><img border="0" src="picture.gif" height="10" width="15" /></a>
     
  3. conor

    conor New Member

    Messages:
    348
    To make it XHTML friendly you should also define the mesurement, ie. width="10px" or else it could be interpreted as 10em or 10%.
     

Share This Page