EncyclopediaABC   DEFG   HIJK   LMNO   PQRS   TUVW   XYZOther
 
Home / Encyclopedia / T

Tab key

Tab key (abbreviation of tabulator key) on a keyboard is used to advance the cursor to the next tab stop.

Origin

When a person wanted to type a table on a typewriter, there was a lot of time-consuming and repetitive use of the space bar and backspace key. To simplify this, a bar was placed in the mechanism with a moveable lever for every position across the page. Initially these were set by hand but later tab set and tab clear keys were added. When the tab key was depressed the carriage advanced to the next tab stop. These were set to correspond to the particular column locations of the table, hence tab, being worked on. The tab mechanism also came into its own as a rapid and consistent way of uniformly indenting the first line of each paragraph.

ASCII and EBCDIC

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. A vertical tab (VT) also exists and has ASCII decimal character code 11. 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.

Originally printers used mechanical tab stops to indicate where the tabs went. This was done horizontally with movable metal prongs in a row and vertically with a loop of mylar or other tape the length of a page with holes punched in it to indicate the tab stops. Initially these were manually set to match the preprinted forms the printer was going to print. The intention was to have the machine be programmed with other control characters to set and clear the stops but it is unclear if any popular printers implemented this. Instead it was rather quickly replaced with fixed tab stops, at every multiple of 8 characters horizontally and every 6 lines vertically, so they simply became a form of data compression, since a printing program could easily add the necessary spaces to move to any position wanted on a form. The vertical size was chosen to be 1 inch. It is unclear why the 8-character horizontal size was chosen, as 5 characters, half inch in a typical printer at that time, was much more popular at that time as a paragraph indentation. It may have been chosen to match early Fortran conventions for where the statement text started after the line number and continuation character. Or it may have been chosen as the smallest size that would fit numbers typically printed in a table.

ISO 6429 also includes the codes 136 Horizontal Tabulation Set, 137 Horizontal Tabulation with Justification and 138 Vertical Tabulation Set.

Tabs are almost always rendered as a form of whitespace larger than a single space, while some text editors mark tabs with special graphics to facilitate distinguishing tabs and whitespaces. In word processor applications, the tab key typically moves the cursor to the next tab stop. In most other graphical applications, the tab key will shift the focus to the next control or widget.

A UNIX program, <code>expand</code> expands a tab to a number of spaces and <code>unexpand</code> does the opposite.

Text divided into fields delimited by tabs can be pasted into a word processor and formatted into a table with a single command.

Tabs in HTML

HTML represents the horizontal tab as '&amp;#09;' but as with all whitespace characters this does not allow actual insertion of tabs into the page except inside <pre></pre> tags or elements with CSS attribute <code>white-space</code> set to <code>pre</code>.

Here is an example showing the use of &amp;#09; with <pre></pre> tags. If you write in HTML: <source lang="html4strict"> <pre> These 2 lines are tabbed: 2005&#09;This line uses a tab space. &#09;This line also uses a tab space. This line does not use a tab space. </pre> </source>

The result would be something like this: <pre> These 2 lines are tabbed: 2005This line uses a tab space. This line also uses a tab space. This line does not use a tab space. </pre>

The vertical tab is � but is not allowed in SGML, including HTML and XML 1.0.

The issue is of concern in the use of CSS, which asserts that in an element where white space is to be preserved:

... 2. All tabs (U+0009) are rendered as a horizontal shift that lines up the start edge of the next glyph with the next tab stop. Tab stops occur at points that are multiples of 8 times the width of a space (U+0020) rendered in the block's font from the block's starting content edge.

Source: Wikipedia

Translation of "Tab key"

Czech: Tabulátor, Danish: Tabulatortast, German: Tabulatortaste, Spanish: Tabulador, French: Touche tabulation, Dutch: Tab, Japanese: タブキー, Polish: Tab (klawisz), Russian: Табуляция, Slovenian: Tabulator, Ukrainian: Табуляція.


show options »   

Search inside:










  More articles in: