HTML and CSS have poor support for tabulation. The tab character (	) is only rendered within preformatted tags (<pre>). There's almost no control over the width of tab stops, as described in the CSS3 working draft:
'A tab (U+0009) is rendered as a horizontal shift that lines up the start edge of the next glyph with the next tab stop. Tab stops occur at points that are multiples of 8 times the width of a space (U+0020) rendered in the block's font from the block's starting content edge.'
The HTML 4.01 specification describes tab stops differently:
'The horizontal tab character (decimal 9 in [ISO10646] and [ISO88591] ) is usually interpreted by visual user agents as the smallest non-zero number of spaces necessary to line characters up along tab stops that are every 8 characters. We strongly discourage using horizontal tabs in preformatted text since it is common practice, when editing, to set the tab-spacing to other values, leading to misaligned documents.'
I find that trying to hack around this by adjusting font size works in Firefox, but not Internet Explorer or Opera:
<pre style='font-size: 2.5pt'> <span style='font-size: 10pt'>text</span> </pre>
The above example will show a tab width of 2 characters in Firefox 3.0.13.
Sometimes I require a literal tab character, spaces or other kluges will not suffice. Particularly, for makefile snippets which do not function properly with spaces. The HTML GNU Make manual cautions scripters to use tabs as appropriate, but otherwise seems to ignore the issue and uses spaces throughout all their examples.
There's a working draft for adding control of tabbing attributes in CSS, but it's dated Jan., '97. Dave Raggett, author of aforementioned draft, said it wasn't accepted by MS or Netscape.
Dave directed me to Bert Bos for present details on the issue. Bert replied with an extensive email that outlined all general use cases for tabs and stated that this particular issue had been discussed since the beginning of CSS but never published due to its low priority in the world of tabulation troubles.
Finally, there used to be a tab tag in HTML 3 .
And that's why my makefile snippets look terrible.