Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emulating HTML 3 <tab> elements in modern browsers

Tags:

html

Html 3 have nice rare feature tabs like in word: http://www.w3.org/MarkUp/html3/tabs.html but I can't use this feature in modern browsers. Is there newer option to format text in paragraph without tables, multi &nbsp and css columns?

I'm trying to make this layout in one paragraph:

Price in USD/per kg
A      20$
BBB    30$
CCCCC  40$

Thanks!

like image 608
Piotr Nowicki Avatar asked Jul 08 '13 09:07

Piotr Nowicki


2 Answers

You can use <pre> tag in HTML. This will show the text in a preformatted way.

like image 74
Chirag Vidani Avatar answered Oct 20 '22 09:10

Chirag Vidani


HTML 3.0 was an incomplete draft, in the mid-1990s, which was never completed, approved, or implemented (though some manuals and vendors used “HTML 3.0” as a buzzword long after HTML 3.0 draft expired).

Some of the ideas in HTML 3.0 were later developed and adopted into specifications, but the tab element was completely abandoned.

You can still use the pre element, which has been in HTML since the early days. Within in, formatting is preserved, and TAB characters (horizontal tab, HT, U+0009) takes you to the next tab stop. But the stops are set at every 8th character, in a fixed manner. The proposed tab-size property in CSS would let you set the “size” of the TAB character, though, and it has been implemented in several browsers.

However, for the data outlined in the question, an HTML table element is clearly the simplest, the most logical, and the most robust way. If your authoring environment does not let you use HTML tables, it won’t let you do much useful in the realm of web authoring in general – in any case, if this is really a problem, you should describe the specific constraints and ask a question about dealing with them, instead of asking about a hypothetical idea abandoned almost 20 years ago.

like image 29
Jukka K. Korpela Avatar answered Oct 20 '22 09:10

Jukka K. Korpela