While I agree with the first answer that you might as well just put 4 spaces, there does seem to be some support for a tab-size
property within CSS (though IE support is lacking):
pre {
-moz-tab-size: 4; /* Firefox 4+ */
-o-tab-size: 4; /* Opera 11.5 & 12.1 only */
tab-size: 4; /* Chrome 21+, Safari 6.1+, Opera 15+ */
}
Only effective using white-space: pre
or white-space: pre-wrap
(or within
tags).
- W3C specification
- jsFiddle demonstration
- Browser support