What is indentation and why does it matter in Logseq?

Indentation is one of the fundamental concept in Logseq (and outliners in general). It’s the feature that allows block references and queries to work. In other words: indentation helps you to find stuff in Logseq.

The idea of indentation is simple: anytime you hit the Tab key, the block your cursor is in moves to the right. Indenting a block nests it under the block above, creating a parent-child relationship:

parent-child-example-letters_1641572097841_0

Let’s walk through the example step-by-step:

  • Block A is a parent block; B and C are children of A; block D is a grandchild of A.
  • Block B is a child of A and it’s in the same branch as blocks C and D.
  • Block C is a child of A and the parent of D.
  • Block D is a child of C and the grandchild of A.

Why is this important? As we’ve discussed in the previous lessons, Logseq is a networked note-taking tool that works with links. We also discussed that Logseq has no hierarchy, which is actually nuanced. As you’ve probably deduced by now, hierarchy in Logseq happens at the block level.

By indenting blocks, you create a branch that you can navigate. Let’s turn the example above into links and navigate to the linked references of block D, which we’ll name Child D:

By going to the page of Child D, we can see this hierarchy it’s in: first up is Parent and child C and then Parent A.

By clicking on one of the parents, the whole branch becomes visible:

child-d-branch_1641572326932_0

That’s the basics of indentation! It’s not much more complex than this, but it opens up a world of possibilities.

1 Like

Above the third image you claim: ‘By clicking on one of the parents, the whole branch becomes visible:’. But when I click on the [[Parent and child C]] link, the result does not show [[Child B]]. This happens on MS Windows and Linux, in version 0.7.6

I believe that this is expected behaviour. When you click on a block, only that block and all children are visible, not other blocks at the same hierarchy level. Clicking on block C will reveal block C and block D. If you would like to group B and C together, you would need to click block A.

Correct, but parent A will also be visible. Clicking on block C will show references to itself in the linked references section.

In the breadcrumbs of the reference to itself, Parent A is visible. On Android, Parent A is fully referenced.

Sorry for taking so long to get back to this thread, but thanks for the clarification!
I guess that the text clicking on one of the parents lead me to believe that clicking either A or C would both result in the image as shown. But apparently this image is the one that results from clicking A.