SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Guru
    Join Date
    Feb 2004
    Location
    Oregon
    Posts
    686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ascii tab value?

    is there an ascii value for a tab? I need to insert it into a file and have the browsers see it as a tab. any ideas?
    success is not by chance, it is by choice.

  2. #2
    SitePoint Member
    Join Date
    Aug 2004
    Location
    Australia
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know in c programming ,there is a command called
    /t

    but for html ,it is client's side ,i dont think they are
    OveRuLe.NET Hosting Serving at the Best!
    Unlimited Features
    ::Shared Hosting::Reseller Hosting::

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2003
    Location
    Reston, VA, USA
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't believe that their is an entity for a tab. I think that a tab does exist in ASCII (Dec = 9, Oct = 0011, Hex = 0x09) but when I tried it in my HTML code ( ) it did not display as a tab.

    If you need to add a tab, my only thought is that you could create a style called tab and call it in a <span>. For example, the CSS would be:

    .tab { margin-left:12px; }

    and the HTML would be:

    <span class="tab"></span>

    I guess you could also do it as an inline style if you prefer:

    <span style="margin-left:12px;"></span>

    This seems to work in Firefox and IE6.

  4. #4
    SitePoint Guru
    Join Date
    Feb 2004
    Location
    Oregon
    Posts
    686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmmm, I would but spaces aren't considered tabs and this goes in a text file so no html. is this for a tab? &#011 I might have to give that a try.

    thanks guys
    success is not by chance, it is by choice.

  5. #5
    SitePoint Member AdamsHC's Avatar
    Join Date
    Aug 2004
    Location
    Lithuania
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    tab is considered as whitespace in html and it doesn't have corresponding entity. You should use several non-breaking spaces (&nbsp; ) or format layout using CSS, as already somebody described.

  6. #6
    SitePoint Guru
    Join Date
    Feb 2004
    Location
    Oregon
    Posts
    686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    agian, I can't use css.

    and spaces are not considered as tabs so it fails. I must use tabs, no spaces.

    if you want to know what it is tha tI am doing it is for froogle. I trying to bypass the doing it by hand so I made a script to do it for me, no html or css.
    success is not by chance, it is by choice.

  7. #7
    SitePoint Member AdamsHC's Avatar
    Join Date
    Aug 2004
    Location
    Lithuania
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    then I think you should say more about language you are using for script. Did you try \t as overule suggested?

  8. #8
    SitePoint Guru
    Join Date
    Feb 2004
    Location
    Oregon
    Posts
    686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well actually it won't work. \t, \r, \n will all get saved in the text file as it is, it won't create a tab. but it looks as if I don't need it.
    success is not by chance, it is by choice.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •