create a TAB ?

D

don

Although I've seen several referances online as to how to display a tab
using these special character codes:

neither has worked for me.

Is there a quick way to tab over in a web page other than typing   5
or 8 tiimes!
 
D

dorayme

"don said:
Although I've seen several referances online as to how to display a tab
using these special character codes:

neither has worked for me.

Is there a quick way to tab over in a web page other than typing   5
or 8 tiimes!

<p style="white-space: pre-wrap">You are clutching at every
possible straw you can to avoid the perfectly reasonable
idea that science is just common reasoning gone more self
conscious and exact and organised. You imagine that in this
process there is some well defined thing called The Scientific
Method. But this is a simplistic chimera of yours and   a product
of naive thinking at every turn.</p>

But watch out for the space not seeming to appear for *some*
browser widths/font-sizes under pressure of wrap. Just tap the
space bar the number of times you want the space between "to" and
"avoid" or the tab key.
 
J

Jukka K. Korpela

"Don" has been reading poor referances. I would recommend reliable
references instead. According to them, the TAB character is equivalent to a
space in HTML, except in a few exceptional contexts.
<p style="white-space: pre-wrap">

The question is obscure, but it didn't quite deserve such a wrong answer.

The question that should have been asked is, most probably, "how do I
But watch out for the space not seeming to appear for *some*
browser widths/font-sizes under pressure of wrap. Just tap the
space bar the number of times you want the space between "to" and
"avoid" or the tab key.

Sense that does not make.
 
D

dorayme

"Jukka K. Korpela said:
The question is obscure, but it didn't quite deserve such a wrong answer.

I was imagining a specific thing he wanted in the typing of some
text in a paragraph, namely how to make space bar spaces or tab
bar spaces show up. The idea being that "don" would respond and
say that is what he wanted and either explain why[*] and further
clarify his question. Or leave it a mystery.

The question that should have been asked is, most probably, "how do I
present tabular data in HTML?", and the correct answer is "using a <table>
element".

Honest, had he asked this, I would have guessed the answer! <g>

Sense that does not make.

OK, seems one or the other or both of my sentences are not clear.

If you type a paragraph, the prewrap element retains the spaces
but allows the text to wrap. If "don" wanted these spaces to
appear, they will for the most part. But for some browser widths,
the spaces might not be manifest if they occur just before the
wrap.

In the text I provided,

"<p style="white-space: pre-wrap">You are clutching at every
possible straw you can to avoid the perfectly reasonable idea
that science is just common reasoning gone more self conscious
and exact and organised. You imagine that in this process there
is some well defined thing called The Scientific Method. But this
is a simplistic chimera of yours and   a product of naive
thinking at every turn.</p>"

in the first paragraph, there is a word "to" followed by the word
"avoid" which was an example of where there might be some unusual
space. I forget if I gave a URL or simply offered the above in
the body of my post. Perhaps the space is lost in usenet space?
(not sure if the pun is intended? <g>)
 
D

don

I tried your <pre wrap> tab but it did not seem to do anything...........

dorayme said:
Jukka K. Korpela said:
The question is obscure, but it didn't quite deserve such a wrong answer.

I was imagining a specific thing he wanted in the typing of some
text in a paragraph, namely how to make space bar spaces or tab
bar spaces show up. The idea being that "don" would respond and
say that is what he wanted and either explain why[*] and further
clarify his question. Or leave it a mystery.

The question that should have been asked is, most probably, "how do I
present tabular data in HTML?", and the correct answer is "using a
<table>
element".



Sense that does not make.

OK, seems one or the other or both of my sentences are not clear.

If you type a paragraph, the prewrap element retains the spaces
but allows the text to wrap. If "don" wanted these spaces to
appear, they will for the most part. But for some browser widths,
the spaces might not be manifest if they occur just before the
wrap.

In the text I provided,

"<p style="white-space: pre-wrap">You are clutching at every
possible straw you can to avoid the perfectly reasonable idea
that science is just common reasoning gone more self conscious
and exact and organised. You imagine that in this process there
is some well defined thing called The Scientific Method. But this
is a simplistic chimera of yours and a product of naive
thinking at every turn.</p>"

in the first paragraph, there is a word "to" followed by the word
"avoid" which was an example of where there might be some unusual
space. I forget if I gave a URL or simply offered the above in
the body of my post. Perhaps the space is lost in usenet space?
(not sure if the pun is intended? <g>)
 
D

dorayme

"don said:
I tried your <pre wrap> tab but it did not seem to do anything...........

Are you saying that the spaces do not appear in a browser that
loads:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
<title>test page</title>
</head>
<body>
<p style="white-space: pre-wrap">You are clutching at every
possible straw you can to avoid the perfectly
reasonable idea that science is just common reasoning gone more
self conscious and exact and organised. You imagine that in this
process there is some well defined thing called The Scientific
Method. But this is a simplistic chimera of yours and   a product
of naive thinking at every turn.</p>
</body>
</html>

?
 
J

Jukka K. Korpela

dorayme said:
I was imagining a specific thing he wanted in the typing of some
text in a paragraph, namely how to make space bar spaces or tab
bar spaces show up.

What an odd idea. Why would text in paragraphs need such features or benefit
from them?
The idea being that "don" would respond and
say that is what he wanted and either explain why[*] and further
clarify his question.

How would that be the idea? You make some unspecified assumption on what the
OP really wants. Why would he know whether your assumption is correct?
Honest, had he asked this, I would have guessed the answer! <g>

He asked it; he just did not know how to express it.
OK, seems one or the other or both of my sentences are not clear.
Granted.

If you type a paragraph, the prewrap element

Stop right there. There is no prewrap element, and you know that.
retains the spaces
but allows the text to wrap.

Well, if you mean the CSS declaration white-space: pre-wrap, then the first
question is why you recommend that, instead of white-space: pre, which has
Perhaps the space is lost in usenet space?

Quite possibly. But more importantly, the unreliable CSS technique does not
help much. You would still need to count your spaces. Why would that be
essentially easier than typing no-break spaces? They're simple characters,
and you can enter them as such, instead of the clumsy &nbsp; entity
reference. For example, using the modern standard Finnish keyboard, designed
for ease typing of all European languages written in Latin letters and more,
you would simply use AltGr+space. It's not particularly difficult to keep
AltGr pressed down, at least if you can use both hands.
 
D

dorayme

"Jukka K. Korpela said:
What an odd idea. Why would text in paragraphs need such features or benefit
from them?

Who knows?
The idea being that "don" would respond and
say that is what he wanted and either explain why[*] and further
clarify his question.

How would that be the idea? You make some unspecified assumption on what the
OP really wants. Why would he know whether your assumption is correct?

I gave him an example. He can clarify.
He asked it; he just did not know how to express it.

Well, if that is perfectly right, then so be it. Perhaps he will
or has clarified it. Perhaps it is simply obvious to others.
Perhaps I just saw his question in a peculiar way at the time.

....
Stop right there.

I'd rather you did not. said:
There is no prewrap element, and you know that.


...white-space: pre-wrap, then the first
question is why you recommend that, instead of white-space: pre, which has
much better support, or the HTML <pre> element, which has universal support.
There was no reference to any wrapping in the question.

As for there being no reference to wrapping in the question, I
figured that if someone did want some white space to show, it
might not be at the expense of losing wrapping. That is what I
figured and perhaps it should be seen as an invitation to discuss
the matter further...
 
H

Harlan Messinger

don said:
Although I've seen several referances online as to how to display a tab

That would be a neat trick, since a tab is a non-displaying character.

using these special character codes:

neither has worked for me.

Assuming you mean, how would you create the alignment effect associated
with tabs, I don't see how that could work since HTML doesn't define tab
*stops*--the positions on the horizontal line to which each press of the
Tab key is supposed to move the insertion point.
 
H

Harlan Messinger

Ben said:
Tabs do work in <pre> etc. elements. I think it is defined somewhere
that your tabstop is 8 columns.

Here it is (CSS 2.1 16.6.1):

2. All tabs (U+0009) are 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 mutiples of 8 times the width of a space
(U+0020) rendered in the block's font from the block's starting
content edge.
Ah, OK, thanks. Though, FWIW: this is a CSS feature rather than an HTML one.
 
D

Doug Miller

Ah, OK, thanks. Though, FWIW: this is a CSS feature rather than an HTML one.

No, it's not. It's an HTML feature; example follows:

<html>
<head>
</head>
<body>
<pre>
text+tab text+tab text+2 tabs more text
</pre>
</body>
</html>

Copy and paste; replace the white space with tabs in the obvious places, and
display in the browser of your choice.
 
H

Harlan Messinger

Doug said:
No, it's not. It's an HTML feature; example follows:

A feature whose definition comes from CSS 2.1 is a CSS feature, not an
HTML feature.
<html>
<head>
</head>
<body>
<pre>
text+tab text+tab text+2 tabs more text
</pre>
</body>
</html>

Copy and paste; replace the white space with tabs in the obvious places, and
display in the browser of your choice.

A standards-based browser that supports CSS will implement the features
provided by CSS as well as the features provided by HTML. A CSS feature
doesn't become an HTML feature thereby.
 
J

Jukka K. Korpela

Doug said:
<pre> has been around a lot longer than CSS.

Not an awful lot longer, but surely longer.

On the other hand, HTML specs have always warned about relying on the use of
TAB even within <pre>. It was never a good idea, since if you really want
the tabbing specified in HTML specs, you can use a suitable number of
spaces.

And, of courses, tables have been with us for a long, and they are fairly
suitable for presenting tabular material - which is what tabbing is usually
about.
 
H

Harlan Messinger

Doug said:
<pre> has been around a lot longer than CSS.

Relevance? We were talking, and disagreeing, about tab stops, not <pre>.
Your remark is like saying that relative positioning, which is defined
in CSS 2.1, is an HTML feature because it can be applied to divs, and
divs predate CSS 2.1.
 
D

Doug Miller

Relevance? We were talking, and disagreeing, about tab stops, not <pre>.
Your remark is like saying that relative positioning, which is defined
in CSS 2.1, is an HTML feature because it can be applied to divs, and
divs predate CSS 2.1.

Oh, I see. Apparently you think tab stops didn't exist prior to CSS 2.1.
 
H

Harlan Messinger

Doug said:
Oh, I see. Apparently you think tab stops didn't exist prior to CSS 2.1.

<sigh/> I said in the first place that tab stops aren't defined in HTML,
so OBVIOUSLY THAT'S WHAT I THOUGHT. Then you responded by telling me
that they were defined IN CSS 2.1 which is, by all reason either (a) an
amplification, by which you were confirming that they weren't in HTML,
and it was CSS that provided them, or (b) a complete non sequitur.

If you wish to insist that they are provided by HTML, then why don't you
show us where in the *H*T*M*L* spec they are defined, instead of where
in the C*S*S spec they are defined? Unless they are defined in the HTML
spec, THEY ARE NOT PART OF HTML.
 
H

Harlan Messinger

Ben said:
<sigh/> I said in the first place that tab stops aren't defined in HTML,
so OBVIOUSLY THAT'S WHAT I THOUGHT. Then you responded by telling me
that they were defined IN CSS 2.1 which is, by all reason either (a) an
amplification, by which you were confirming that they weren't in HTML,
and it was CSS that provided them, or (b) a complete non sequitur.

If you wish to insist that they are provided by HTML, then why don't you
show us where in the *H*T*M*L* spec they are defined, instead of where
in the C*S*S spec they are defined? Unless they are defined in the HTML
spec, THEY ARE NOT PART OF HTML.

They do get a mention in the HTML spec, in the section about PRE:

The horizontal tab character (decimal 9 in [ISO10646] [p.353] and
[ISO88591] [p.354] ) 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.

But it's less encouraging for would-be tab users than what we find in
the CSS spec.

Thanks! That's all I asked for. I don't understand why Doug thought that
citing a section of CSS 2.1 was a way to correct my (mistakenly)
impression that tab stops weren't defined in HTML. And I agree about the
less-than-encouraging part! Frankly, tab stops set every n characters
are rarely of any particular use anyway. Any time you have columns of
varying lengths--especially if they can vary by more than the number of
spaces to which the tab stop is equivalent, tabs really give you little
in the way of column alignment.
 
D

Doug Miller

Ben said:
Doug Miller wrote:
Oh, I see. Apparently you think tab stops didn't exist prior to CSS 2.1.
<sigh/> I said in the first place that tab stops aren't defined in HTML,
so OBVIOUSLY THAT'S WHAT I THOUGHT. Then you responded by telling me
that they were defined IN CSS 2.1 which is, by all reason either (a) an
amplification, by which you were confirming that they weren't in HTML,
and it was CSS that provided them, or (b) a complete non sequitur.

If you wish to insist that they are provided by HTML, then why don't you
show us where in the *H*T*M*L* spec they are defined, instead of where
in the C*S*S spec they are defined? Unless they are defined in the HTML
spec, THEY ARE NOT PART OF HTML.

They do get a mention in the HTML spec, in the section about PRE:

The horizontal tab character (decimal 9 in [ISO10646] [p.353] and
[ISO88591] [p.354] ) 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.

But it's less encouraging for would-be tab users than what we find in
the CSS spec.

Thanks! That's all I asked for. I don't understand why Doug thought that
citing a section of CSS 2.1 was a way to correct my (mistakenly)
impression that tab stops weren't defined in HTML.

Ummmm.... go back and read that again. I am not the one who cited a section of
CSS 2.1. That was someone else.
 
D

Doug Miller

<sigh/> I said in the first place that tab stops aren't defined in HTML,
so OBVIOUSLY THAT'S WHAT I THOUGHT. Then you responded by telling me
that they were defined IN CSS 2.1

No, I didn't. Pay attention to the attributions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top