*** Welcome to piglix ***

Indentation (typesetting)


In the written form of many languages, an indentation is an empty space at the beginning of a line to signal the start of a new paragraph. Many computer languages have adopted this technique to designate "paragraphs" or other logical blocks in the program.

For example, the following lines are indented, using between one and six spaces:

 This paragraph is indented by 1 space.

   This paragraph is indented by 3 spaces.

      This paragraph is indented by 6 spaces.

In computer programming, the neologisms outdent and unindent are used to describe the reversal of the indentation process, realigning text with the page margin (or with previous, lesser, levels of indentation).

In right-to-left languages (e.g. Hebrew and Arabic), indentation is used just the same, but from the right margin of the paper, where the line begins.

There are three main types of indentation, illustrated below in relation to borders representing the page dimensions.

In computer programming languages, indentation is used to format program source code to improve readability. Indentation is generally only of use to programmers; compilers and interpreters rarely care how much whitespace is present in between programming statements. However, certain programming languages rely on the use of indentation to demarcate programming structure, often using a variation of the off-side rule. The Haskell, Occam, Python, and Ya programming languages rely on indentation in this way.

Debates over where to indent, whether to use spaces or tabs, and how many spaces to use are often hotly debated among programmers, leading some to classify indentation as akin to a religious war. In 2006 a third method of indentation was proposed, called elastic tabstops.


...
Wikipedia

...