Home

indentation

Indentation is the use of horizontal space at the beginning of a line to indicate structure, hierarchy, or grouping within text or code. In prose and typography, indentation most commonly marks the start of a new paragraph or a quoted block and helps readers parse rhythm and organization.

In traditional text, the first-line indent is a fixed amount of space, often about 0.5 inches (1.27

In computer programming, indentation serves as a visual cue for code blocks. In many languages (such as

In data formats and markup, indentation expresses nesting without changing the content. YAML relies on indentation

Accessibility and readability considerations encourage consistent indentation and alignment. Irregular or excessive indentation can hinder scanning

Historically, indentation has evolved from manuscript practices to modern styles, reflecting the balance between visual clarity

cm)
in
printed
formats,
though
exact
measurements
vary
by
language,
publication,
and
style
guide.
Some
styles
use
hanging
indents
for
bibliographies,
where
the
first
line
is
flush
and
subsequent
lines
are
indented.
Python),
indentation
is
semantically
significant,
determining
block
structure;
in
others
(C,
Java,
JavaScript),
braces
delimit
blocks
and
indentation
is
primarily
for
readability.
This
has
led
to
debates
about
spaces
versus
tabs,
with
guidelines
such
as
PEP
8
recommending
4
spaces
per
indentation
level
and
avoiding
mixing
spaces
and
tabs.
to
denote
hierarchical
structure,
while
JSON
ignores
whitespace
for
data
values
and
HTML
uses
indentation
only
for
source
readability.
and
increase
cognitive
load,
especially
for
readers
with
dyslexia
or
other
reading
differences.
and
typographic
conventions
across
different
languages
and
domains.