This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes How to insert a tab in HTML? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to insert a tab in HTML?" Watch "How to insert a tab in HTML?" New topic
Author

How to insert a tab in HTML?

Shiaber Shaam
Ranch Hand

Joined: Jun 16, 2006
Posts: 252
Hi,

How to insert a tab in HTML?

Thanks,


$Hi/\bEr
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61449
    
  67

if you are referring to a tab character, that has no meaning in HTML. What are you really trying to do?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Without more info all I can say is \t

Eric
Shiaber Shaam
Ranch Hand

Joined: Jun 16, 2006
Posts: 252
Yes, I want to insert a tab character.

I want to leave some spaces between two words inside a <td></td>.

Please Help.
[ July 10, 2008: Message edited by: Shiaber Shaam ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61449
    
  67

Tabs will not do that. You'll need to use non-breaking spaces, or better yet, CSS.
Shiaber Shaam
Ranch Hand

Joined: Jun 16, 2006
Posts: 252
I tried nbsp. It didn't work.

Please let me know other possibilities.

Thanks,

[ July 10, 2008: Message edited by: Shiaber Shaam ]
[ July 10, 2008: Message edited by: Shiaber Shaam ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61449
    
  67

Originally posted by Shiaber Shaam:
I tried  . It didn't work.
This is the most useless thing you could post. If you want help, tell us what you tried, and how it didn't work. Otherwise, you are wasting your time and ours.
[ July 10, 2008: Message edited by: Bear Bibeault ]
Shiaber Shaam
Ranch Hand

Joined: Jun 16, 2006
Posts: 252
Sorry, I tried "nbsp", in my post it appeared as spaces.


Thanks,
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61449
    
  67

Originally posted by Shiaber Shaam:
Sorry, I tried "nbsp", in my post it appeared as spaces.
Correct. You can use multiple non-breaking spaces to get the spacing you want. Otherwise, HTML collapses multiple whitespace to a single character.

That's rather hacky though. A CSS solution would be best.
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

here you can get the idea.


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to insert a tab in HTML?