A: 

You could do position: relative; top: 3px; on the <img> tag. You could also try vertical-align: middle; on the <td> tag, but I don't think it'll work properly, as I'm pretty sure I've encountered this before. You could also put them in separate <td> tags, but that's kind of a no-no.

Paolo Bergantino
Why would that be a no-no if you're already using a table? You'll at least get automatic vertical centering...
alex
Well, I don't know the context in which he has that, there's an off chance the table is still being properly used, however if you were to split it it'd get a little too 2002 for me. That's why I said "kind of" - I'd personally consider it, but there's a lot of CSS purists around these parts.
Paolo Bergantino
I don't see how my answer deserved a down vote...
Paolo Bergantino
i didn't vote it down, somebody else did. I got two vote-downs, lol. People around here are weird sometimes.
alex
That's probably because someone asking a question about HTML and the two of you probably should be answering. Bit like me answering some Fortran questions having never touched it in 20 years (damn, is it that long?).
Steve Perks
*shouldn't be answering
Steve Perks
Modifying the HTML alters the semantic meaning of the page. Since this is an issue of layout, not content or semantics, the position should be adjusted with a layout-based solution, either with CSS, or altering the DOM with javascript.
cdeszaq
"The two of you probably shouldn't be answering"? Did you seriously just say that? Wow.
Paolo Bergantino
A: 

I would put the two elements (image and text) in their own separate table cells. You could nest another table. That's a good place to start. Then you could play around with padding, etc. to adjust.

<td>
<table><tr style="vertical-align:top;"><td><img src="path_here" /></td><td>my feed</td></tr></table>
</td>
alex
This sort of nesting of tables decreases the semantic value of the page. Since this is an issue of layout, not content or semantics, the position should be adjusted with a layout-based solution, either with CSS, or altering the DOM with javascript.
cdeszaq
A: 

simply try "vertical-align: middle" on IMG tag, after than you can also set padding for TD

Joey
+4  A: 

The image is aligning to the base line of the text, this does not include the descender height which is the 'tick' in letter like g or y.

If the height of the row/cell is to be fixed, you can add line-height to get it to vertically centre. So for instance, assuming your cell is 16px high:

td.feed {
    line-height:16px;
}

The other option would be to add the icon as a background image, adding padding-left to the cell:

td.feed {
    background: transparent url(/wp-content/feed-icon-16x16.gif) no-repeat left center;
    padding-left: 18px; /* width of feed icon plus 2px spacing */
}

The second one would mean you could remove the need for tables at all, now there's an idea...

roryf
I personally use the background image way, the only downside is that the image is not clickable and a lot of users try to click the image before the text.
Paolo Bergantino
If you put the background image on the <a> element it will be clickable.
roryf
Ah. Touche. I had never thought of that. I usually did a span around the a. Interesting.
Paolo Bergantino
+5  A: 

well if you choose the background image method, then it is very simple: "background: url(feed.png) left center"

Joey
+1, the image should be a background image as it's more decoration than actual content.
Ryan Doherty
+2  A: 

What's wrong with making it a background image?

.feed {
  background: transparent url("http://blog.garethjmsaunders.co.uk/wp-content/feed-icon-16x16.gif") no-repeat scroll left center;
  padding-left: 16px;
}
Ms2ger
+1  A: 

Other answers that state the image shouldn't be part of the content and is merely for decoration, which is debatable. I do believe that you should add an empty alt attribute to your image so that screen readers can ignore the image if you choose to keep your current method.

The vertical-align property is the one you need to be using here, but what you want to use is text-bottom. I'm also going to assume you want this to be a link, so here's a full code example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>garethjmsaunders.co.uk</title>
    <style type="text/css">
    a { text-decoration: none; }
    a img { border: 0; vertical-align: text-bottom; }
    </style>
  </head>
<body>
<table>
<tr>
<td>
  <a href="" title="garethjmsaunders.co.uk rss feed">
    <img alt="" src="http://blog.garethjmsaunders.co.uk/wp-content/feed-icon-16x16.gif" />
    My feed
  </a>
</td>
</tr>
</table>
</body>
</html>

If this still isn't desirable, you can experiment with line-height and other values for vertical-align to see what works best for you.

cowgod
A: 

Try this:

<td>
   <img src="http://blog.garethjmsaunders.co.uk/wp-content/feed-icon-16x16.gif"/&gt;
   <span class="feedTxt">My feed</span>
 </td>

 .feedTxt { line-height: 20px; } /* Or whatever the height of the image is.  Adjust as needed. */
Plan B