tags:

views:

44

answers:

4
+1  Q: 

tabulation spacing

is there an equivalent to the consoles special char '\t' in html ?

A: 

Not that I know of, I usually use   or pre elements.

Ow01
+1  A: 

Other than relying on non breaking spaces, you can use a literal tab character inside of pre element, or by specifying white-space:pre as such:

<p id="foo">tab  between</p>
<style>
p#foo {
    white-space:pre;
}
meder
That depends on browser behaviour, sadly.
strager
+1  A: 

You could use CSS's text-indent rule to apply a pre-defined indentation to the first line of a textblock.

<p style="text-indent:20px;">Hello World. I'm indented 20px.</p>
Jonathan Sampson
+2  A: 

Use tables for table data.

There is no standard way to tabulate data without a table (either a real table using <table> or faking it with CSS display).

strager
Where did he mention tabular data?
Jonathan Sampson
@Sampson, What thing other than data could he tabulate?
strager