Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

As I'm sure that pretty much everyone on here is aware the "Tab" key when used on a webpage simply jumps to the next element on the page; whether is be a checkbox, radio selector, button, another textbox, a link, etc.

What I am hoping to do is enable me to use the tab key whlie I typing something up in an input form and actually have it insert the tab character into the form I'm filling out. I'm pretty anal retentive when it comes to how my text documents are formatted, ESPECIALLY when it comes to writing articles for my site. Hell, I'm even anal about how my "to-do" lists look when I type them up in good old fashioned Notepad. (Yep, I use good old-fashioned Notepad to write up my article ideas, to-do lists, save little snippets of useful code that I find, etc.)

I realize that there are javascript solutions or properties you can set for that particular textbox - depending on what language you happen to be programming the site in - that you can use to manually program the input fields on your webpage to allow this; but I am more interested in allowing the web browser to behave in its normal fashion (as I do use the tab key to switch between page elements - also especially when filling out long applications and forms in order to navigate between them far more quickly than having to use my mouse to click on each field that I want to fill out.

So, what I'm hoping to find is the Windows ASCII key combo (like using ALT+0169 in order to produce the © character) that I can enter in order to insert the tab into the webpage textbox that way. As I use ASCII key combos routinely to make weird-ass symbols in my write-ups all the time I am quite used to doing things this way. Besides, once done typing up something in a textbox I'd still like to have the ability to tab over to the next element. When programming forms myself for whatever project I happen to be working on I always go out of my way to order the elements in such a way that tabbing through them is as intuative as possible. Who knows how many of you are like me, but I am always bothered when I'm filling out a set of address fields and when you cycle though them they jump around randomly based on whatever order the programmer of that page created them in.

EXAMPLE: You're typing in your name in the first field on a page that has a form that hasn't been properly setup I am always annoyed when I, press tab, and then it suddenly jumps to the City name, followed by the address line 2, then to the zipcode, etc. You get the idea. As far as I know everyone likes to input that information in the order in which you'd hand write an address on an envelope. Name first, followed by address lines one and two, then the city, state, zip, and finally (if neccessary) the country assuming that it's required.

Now that I've explained what I'm trying to do ad nauseum, what is the ASCII key code for Tab?

share|improve this question
    
WoW now this looks like an article rather than a Question !! –  subanki Sep 8 '10 at 15:03
1  
The way you input the Tab character doesn't matter - it will always have the same effect! This is why some programs accept "\t" for tab. –  harrymc Sep 8 '10 at 15:09
    
@harry - unless you do it say, in a web browser (try it in one of these comment boxes for example) where instead the Tab key causes a change in focus. And entering \t technically isn't entering a tab charater - it's entering an escape / control sequence to represent a tab.... –  DMA57361 Sep 8 '10 at 15:10

6 Answers 6

up vote 2 down vote accepted

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.

share|improve this answer
    
This actually works perfectly for me. I use Wordpress as my content management system for my sites, which has a WYSIWYG editor for what you're writing. Hitting the tab key while typing in the main content input box just makes it pan to the next field, however, when using ALT+09 (or ALT+009) as suggested by JNK then it tabs nicely within the box I happen to be using at the time. –  Sootah Sep 8 '10 at 16:29

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.

share|improve this answer

The code is ALT+009

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

share|improve this answer
  • 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

share|improve this answer

Using the Alt-key shortcut gives the exact same behaivor as just hitting the key. If you want to use them, you can fire up Notepad, copy a tab, then paste it into the textbox. When the text is posted, some websites might strip out those characters however. HTML usually ignores excess whitespace anyways, so even if it did make it onto the page source, nothing would happen.

 <- a tab

On Stackexchange sites, it looks like it interprets them as a blockquote...

share|improve this answer

I usually find it easier to open notepad, put in a tab character, and then copy/paste it over where needed using the clipboard.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.