Tab

This article is about the use of the term Tab in computing. For other uses, see Tab (disambiguation).


Contents

Typewriters

When a typist (or typewriter as they were known in the early days) wanted to type a table, 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 a "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. There is also a vertical tab (VT) which in ASCII has decimal character code 11. (The EBCDIC code for HT is 5. The VT is 11 or Hex B the same as ASCII.) The horizontal tab is usually generated by the tab key on a standard keyboard. The horizontal tab was often used as a form of data compression; file sizes could be reduced by using a single horizontal tab character in place of up to eight space characters.

ISO 8859 also includes the codes 136 HTS Horizontal Tabulation Set, 137 HTJ Horizontal Tabulation with Justification and 138 VTS 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, expand expands a tab to a number of spaces and unexpand 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 	 . The vertical tab is  but is not allowed in SGML, XML and including HTML.

Tabs in programming

In computer programming, the use of tabs for code formatting and indentation is an ongoing debate. Programmers are generally divided into two camps - those who use hard tabs in their code, and those who configure their editors to insert actual space characters when they press the tab key. When tabs are replaced to spaces in this way they are referred to as soft tabs.

There are many arguments for and against using hard tabs in code. What can be said without doubt is that one early benefit of tabs, i.e. compression (see above), is now less relevant as storage is so cheap, and sophisticated compression algorithms can provide much greater benefits.

External links

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools