Tab key
Encyclopedia
Tab key on a keyboard is used to advance the cursor to the next tab stop
Tab stop
A tab stop on a typewriter is a location where the carriage movement is halted by mechanical gears. Tab stops are set manually, and pressing the tab key causes the carriage to go to the next tab stop...

.

Origin

The word tab derives from the word tabulate, which means "to arrange data in a tabular, or table, form". When a person wanted to type a table (of numbers or text) on a typewriter
Typewriter
A typewriter is a mechanical or electromechanical device with keys that, when pressed, cause characters to be printed on a medium, usually paper. Typically one character is printed per keypress, and the machine prints the characters by making ink impressions of type elements similar to the pieces...

, there was a lot of time-consuming and repetitive use of the space bar
Space bar
thumb|250px|A [[computer keyboard]], Space Bar is on the bottom center of the keyboardThe space bar, spacebar, or space key, is a key on an alphanumeric keyboard in the form of a horizontal bar in the lowermost row, significantly wider than other keys. Its main purpose is to conveniently enter the...

 and backspace
Backspace
Backspace is the keyboard key that originally pushed the typewriter carriage one position backwards, and in modern computer displays moves the cursor one position backwards, deletes the preceding character, and shifts back the text after it by one position....

 key. To simplify this, a horizontal bar was placed in the mechanism with a moveable lever stop 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
Indentation
An indentation may refer to:* A notch, or deep recesses; for instance in a coastline, or a carving in rock* The placement of text farther to the right to separate it from surrounding text....

 the first line of each paragraph.

Usage

In modern applications, the Tab key rarely has the effect of inserting the Tab character. In word processor applications, the Tab key typically moves the cursor to the next tab stop
Tab stop
A tab stop on a typewriter is a location where the carriage movement is halted by mechanical gears. Tab stops are set manually, and pressing the tab key causes the carriage to go to the next tab stop...

. In most other graphical applications, the Tab key will shift the focus to the next control or widget.

Tab characters

Several tab characters are included as ASCII
ASCII
The American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text...

 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
EBCDIC
Extended Binary Coded Decimal Interchange Code is an 8-bit character encoding used mainly on IBM mainframe and IBM midrange computer operating systems....

 code for HT is 5. The VT is 11 or hex 0B, the same as in ASCII. The horizontal tab is usually generated by the Tab key on a standard keyboard.

Originally, printer mechanisms 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
Carriage control tape
A carriage control tape was a loop of punched tape that was used to synchronize rapid vertical page movement in most IBM line printers from unit record days through the 1970s. The tape loop was as long as the length of a single page. A pin wheel moved the tape accurately using holes in the center...

 to indicate the tab stops. Initially these were manually set up to match the preprinted forms that were loaded into the printer. Later, the intention was to have the machine be pre-programmed, by using other control characters to set and clear the stops: ISO 6429 includes the codes 136 (Horizontal Tabulation Set), 137 (Horizontal Tabulation with Justification) and 138 (Vertical Tabulation Set).

In practice, settable tab stops were rather quickly replaced with fixed tab stops, de facto standardized at every multiple of 8 characters horizontally, and every 6 lines vertically (typically one inch vertically). A printing program could easily send the necessary spaces or line feeds to move to any position wanted on a form, and this was far more reliable than the modal
Mode (computer interface)
In user interface design, a mode is a distinct setting within a computer program or any physical machine interface, in which the same user input will produce perceived different results than it would in other settings....

 and non-standard methods of setting tab stops. Tab characters simply became a form of data compression.

It is unclear why the 8-character horizontal tab size was chosen, since 5 characters, a half inch in a typical printer at that time, was much more popular as a paragraph indentation. The number 8 may have been chosen to match early Fortran
Fortran
Fortran is a general-purpose, procedural, imperative programming language that is especially suited to numeric computation and scientific computing...

 conventions, where the statement text started after the line number and continuation character. It may have been chosen as the smallest size that would fit numbers typically printed in a table.

Tab-separated values (TSV)

Tab-separated values
Tab-separated values
A tab-separated values file is a simple text format for a database table. Each record in the table is one line of the text file. Each field value of a record is separated from the next by a tab stop character – it is a form of the more general delimiter-separated values format.TSV is a simple file...

 (TSV) are a common de facto standard for exporting and importing database or spreadsheet field values. Text divided into fields delimited by tabs can often be pasted into a word processor
Word processor
A word processor is a computer application used for the production of any sort of printable material....

 and formatted into a table with a single command.

The TSV convention for exporting data may be compared to the alternative comma-separated values
Comma-separated values
A comma-separated values file stores tabular data in plain-text form. As a result, such a file is easily human-readable ....

 (CSV) convention.

Gopher menus use tab-separated values to indicate selectors.

Tabs in HTML

HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

 represents the horizontal tab as 	 but as with all whitespace characters this does not allow actual insertion of tabs into the page except inside
tags or elements with CSS attribute white-space set to pre.

Here is an example showing the use of 	 with
tags. If you write in HTML:

These 2 lines are tabbed:
2009 This line uses a tab space.
This line also uses a tab space.
This line does not use a tab space.


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

The vertical tab is  but is not allowed in SGML, including HTML and XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

 1.0.

The issue is of concern in the use of CSS
Cascading Style Sheets
Cascading Style Sheets is a style sheet language used to describe the presentation semantics of a document written in a markup language...

, which asserts that in an element where white space
White space
White space may refer to:* White space , portions of a page left unmarked** Space , the space between two words of text* Whitespace character, a computer character for the space between words...

 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.


The Opera
Opera (web browser)
Opera is a web browser and Internet suite developed by Opera Software with over 200 million users worldwide. The browser handles common Internet-related tasks such as displaying web sites, sending and receiving e-mail messages, managing contacts, chatting on IRC, downloading files via BitTorrent,...

web browser supports the -o-tab-size CSS property, which adjusts the default number of spaces for the tab character.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK