Basics
This page covers the everyday document features that most Stencila documents start with: paragraphs, headings, inline formatting, links, inline code, quotes, and thematic breaks.
Although these features will be familiar from Markdown, Stencila parses them into structured document nodes and preserves that structure across editing, execution, conversion, and publishing workflows.
Paragraphs
Paragraphs are the basic unit of prose. Separate them with a blank line:
This is paragraph one. It has two sentences.
Paragraph two.
This is paragraph one. It has two sentences.
Paragraph two.
Most of the inline syntax on this page is written inside paragraphs.
Headings
Use hash prefixes to create headings from levels 1 to 6:
# Level 1
## Level 2
### Level 3
#### Level 4
##### Level 5
###### Level 6
Level 1
Level 2
Level 3
Level 4
Level 5
Level 6
Headings provide the main outline for your document and are commonly used to structure sections.
Inline formatting
Stencila Markdown supports several common inline formatting forms.
Emphasis, strong, and underline
Use _..._ for emphasis, **...** for strong emphasis, and HTML <u>...</u> for underline:
This is _emphasized_, this is **strongly emphasized**, and this is <u>underlined</u>.
This is emphasized, this is strongly emphasized, and this is underlined.
Strikeout, subscript, and superscript
Use ~~...~~ for strikeout, ~...~ for subscript, and ^...^ for superscript:
This is ~subscripted~, this is ^superscripted^, and this is ~~struck out~~.
This is subscripted, this is superscripted, and this is struck out.
Escaping formatting markers
When you want literal formatting characters instead of formatting, escape them with backslashes:
_\_ under\_scores \__, and **\* aster\*isks \***.
_ under_scores _, and * aster*isks *.
Links
Use standard Markdown link syntax:
A link [example.org](https://example.org).
Links can also include titles, and the link text can contain inline formatting:
With a title and styled content [**example.org**](https://example.org "a title").
Inline code
Use backticks for short code fragments:
A code fragment: `2 * pi * r^2`.
A code fragment: 2 * pi * r^2.
You can also add a language tag to an inline code fragment when you want to make the language explicit:
With language: `6 * 7`{python}.
Tip
If you want executable inline code, see Execution.
Inline quotes
For short inline quotations, you can use HTML <q> when you want quotation semantics inside a paragraph:
Stencila follows the Robustness Principle: <q>be conservative in what you do, be liberal in what you accept from others</q>.
Stencila follows the Robustness Principle: be conservative in what you do, be liberal in what you accept from others
.
Block quotes
Use > to create quoted block content:
> This is a quote block.
Quote blocks can contain multiple paragraphs:
> This quote block...
>
> Has two paragraphs.
This quote block...
Has two paragraphs.
They can also be nested:
> This quote block...
>
> > Has another inside it.
> >
> > > And another inside that!
This quote block...
Has another inside it.
And another inside that!
Thematic breaks
Use three or more asterisks on their own line to create a thematic break:
A paragraph before a thematic break.
***
A paragraph after a thematic break.
A paragraph before a thematic break.
A paragraph after a thematic break.
Thematic breaks are useful for marking a visible shift in topic or separating major parts of a document.
Related guides
This page covers only the most common building blocks. For related features, see:
Schema types
For the formal Stencila Schema definitions behind these features, see: