Nodes and Marks

If you think of the document as a tree, then nodes are just a type of content in that tree. Examples of nodes are paragraphs, headings, or code blocks. But nodes don’t have to be blocks. They can also be rendered inline with the text, for example for @mentions. Think of them as unique pieces of content that can be styled and manipulated in different ways.

Marks can be applied to specific parts of a node. That’s the case for bold, italic or striked text. Links are marks, too. Think of them as a way to style or annotate text.

Differences

Nodes and marks are similar in some ways, but they have different use cases. Nodes are the building blocks of your document. They define the structure and hierarchy of your content. Marks, on the other hand, are used to style or annotate text. They can be applied to any part of a node, but they don’t change the structure of the document.