HTML tab stops for tab-delimited plain text

hi,

I understand the <pre> </pre> tags allow plain text to be displayed with line breaks etc, no need for HTML markup.

Is there also a way to set tab stops unfront so that tab-delimited plain text can be displayed without markup?

eg
<some tab definition code>
<pre>
my plain text with tabs   col 2  col 3 
blabla col2 col 3
</pre>

Open in new window


Thanks
xeniumAsked:
Who is Participating?
 
Jan LouwerensConnect With a Mentor Software EngineerCommented:
Although it won't work in IE (Browser support), if you're using other browsers, you could use the following CSS:

pre
{
   -moz-tab-size: 3;
   -o-tab-size: 3;
   tab-size: 3;
}

Open in new window

0
 
xeniumAuthor Commented:
Thanks a lot

Is there a way to set the tab size for each column?

I'm guessing not.... https://developer.mozilla.org/en-US/docs/Web/CSS/tab-size

Also what are the  -moz-tab-size lines and -o-tab-size lines, for different browsers?

https://www.w3schools.com/code/tryit.asp?filename=FOZ5BFYQYGQS
0
 
Jan LouwerensConnect With a Mentor Software EngineerCommented:
I do not believe there is a way to specify the tab stops per column. You would probably have to perform some kind of text processing (either on the server side, or in javascript) to achieve that.

Yes, the -moz-tab-size lines and -o-tab-size are for older browser versions, prior to them supporting the standard tab-size rule.
0
 
xeniumAuthor Commented:
Thanks a lot
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.