Skip to content
ASCII World

Tab

What is Tab?

Tab (HT, Horizontal Tab) is ASCII code 9, a control character that advances the cursor to the next tab stop. Default tab stops are every 8 columns, but most editors let you configure 2, 4, or 8 spaces per tab.

The tabs-vs-spaces debate persists because tab characters render differently depending on viewer settings - a file indented with tabs looks different at tabstop=2 versus tabstop=4. Languages handle this differently: Python requires consistent indentation (tabs or spaces, not mixed), Go mandates tabs via gofmt, and most JavaScript style guides prefer spaces. Tab is also the column delimiter in TSV (tab-separated values) files, the simpler alternative to CSV. See also whitespace characters and the line feed control character.

References

Related Terms