ASCII Code for the TAB Character? (Want to be able to input tabs into a web page textbox)

Didn't read most of you post, sorry.

But just fixing on the final little question what is the ASCII key code for Tab?
ASCII value for tab is 9 (decimal or hex), so try Alt + ( Numpad 0 , Numpad 9).

But, I've just tested doing so in this very edit box and it doesn't work, but it does in notepad, MS Word, etc. I wonder why...?

Anyway, if you really need a tab somewhere odd, try copying one from notepad and pasting it where you need it - that's what I tend to do.

Edit

If you're doing this for it to be displayed on a website (which is what I think you're implying), a tab character may be ignored because HTML tends to ignore whitespace (outside of pre blocks, etc).

If it is HTML you could also use the HTML entity version 	 as well, but this will function in the same way.


The code is ALT+009

However, I don't think it will accomplish what you are after.


Hope this helps you -- you have quite a long question :-)

Wikipedia Tab key.

Several tab characters are included as ASCII control characters, used for text alignment. The most known and common tab is a horizontal tab (HT), which in ASCII has the decimal character code of 9, and may be referred to as control+I or ^I. A vertical tab (VT) also exists and has ASCII decimal character code 11 (control+K or ^K). The EBCDIC code for HT is 5. The VT is 11 or hex 0B, the same as ASCII. The horizontal tab is usually generated by the tab key on a standard keyboard.

but, do read the rest of the article.


  • The ASCII code for tab is 09.

  • Pressing Alt + 09 in an online form might not provide you Tab character probably because of the browser. But works in some other software applications like Notepad, Wordpad, Garena etc

If you are scripting your own HTML page and if you need to give HTML tab then you could provide this using

  • Tables
  • CSS
  • DD tags

Here have a look here http://htmltab.kb-creative.net/

and Harry is right , if your coding javascript then you could use \t