Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sorry for this one, tab tag

Status
Not open for further replies.

crystalized

Programmer
Jul 10, 2000
390
CA
I don't have my html book handy and can't remember off hand.

Is there a tag that puts a tab into your output, or do I just have to use spaces.

Thanks in advance for your help.
 
Are you talking about the <pre></pre> element, otherwise HTML ignores white space characters.

-pete
 
I meant &quot;&nbsp;&quot; for spaces to force whitespace,

I don't remember using one before but I thought there might be a tag that forces a couple of whitespace spaces.

In the end I just used a couple of &nbsp; spaces and it worked just fine.
 
Apparently this forum recognizes the whitespace nbsp(preceeded by & and followed by a ;) as well, that is why my last post just has spaces where I entered what I used for spaces.
 
Dear Crystal,

Those are called 'entities' not 'tags' or 'elements', i.e.,

<strong> is a 'tag' or 'element'

&nbsp; is an entity

Anyway the entire ASCII character set can theoretically be used by preceding the decimal value of the ASCII character with an ampersand and a pound sign... so a Tab character (9) would be this &#09; Let's see what it does between 'hello' and 'world':

Hello World

On my IE5 on NT4 that displays as a single space.

I have no idea what browser support you will find for this. It's not likely you will get the behavior you desire.

Hope this helps
-pete
 
Sorry I did not know those were referred to as entities. I guess you learn something new every day.

As to support on many browsers, I can live without the whitespace if it does not happen. I predict that most of the time what I am building will be viewed on the big 2 browsers. It is for a group that uses primarily MS products.
 
Well my previous post makes no sense at all. My attempt to exactly display entities does not work in the resultant post (it does in the TT preview).

&-#09 without the dash is the tab entity
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top