BudiBadu Logo
Samplebadu

Markdown by Example: Footnotes

CommonMark / GFM

Footnotes allow you to add notes at the end of the document. This example shows the syntax for defining and referencing footnotes.

Code

Here is a simple footnote[^1].

A footnote can also have a named label[^note].

[^1]: This is the first footnote.
[^note]: This is the footnote with a named label.

Footnotes are automatically numbered and placed at the bottom of the document.

Explanation

Footnotes are another extension to standard Markdown (supported by GFM, Pandoc, etc.). You add a footnote marker in the text using square brackets, a caret, and an identifier: [^1]. The identifier can be a number or a word.

You then define the footnote content elsewhere in the document using the same syntax followed by a colon: [^1]: The footnote text.. The location of the definition in the source file doesn't matter; the renderer will collect all footnotes and display them at the bottom of the rendered page.

Footnotes are great for adding citations, side notes, or clarifications without breaking the flow of the main text. The renderer typically creates a clickable link between the marker and the definition, allowing the reader to jump back and forth.

Code Breakdown

1
[^1] inserts the superscript marker link.
5
[^1]: ... defines the content. It doesn't have to be at the bottom of the source file.