The ideal solution to implement tab in HTML is CSS stylesheets, as Orange Julius suggested.

The two work-arounds suggested have some drawbacks.

  • Multiple    are not guaranteed to give you more than one space indentation, since "nbsp" are also whitespace that could be eliminated as necessary. However, I note IE5 and NS5 do treat them as multiple spaces.
  • Transparent 1-pixel GIF has the overhead of the an extra HTTP request for that small image.

My current preference, if I'm forced to emulate tab in HTML without CSS, is to use inline "table" tags, since almost all browsers understands them now.

<table width=40 border=0 cellspacing=0 cellpadding=0 align=left>
 <tr><td>&nbsp;</td></tr>
</table>

But, if I only need one space I would of course use "nbsp".