You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HTML example from looking at the generated markdown and then changing
the IDs of the links to avoid clashing in the event that someone does
add footnotes to the markdown guide itself. This feels like it might be
fragile because it references CSS classes, but I couldn't think of a
better way in the time that I allowed myself to work on this.
Copy file name to clipboardExpand all lines: app/guide/using-markdown.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,46 @@ This should start with a forward slash (`/`) character:
63
63
We previously wrote about [the pilot](/screening-invite/2025/06/invite-pilot-overview/).
64
64
```
65
65
66
+
### Footnotes
67
+
68
+
Footnotes allow you to add notes and references without interrupting the flow of your writing. When you create a footnote, a superscript number with a link appears where you added the reference.
69
+
70
+
To create a footnote reference, add a caret with an identifier inside brackets `[^1]`. Identifiers can be numbers or words but they can't contain spaces or tabs.
71
+
72
+
Add the footnote using another caret and number inside brackets with a colon and the associated text `[^1]: My footnote`. You don't have to put footnotes at the end of the markdown document -- that's where they will be rendered though. This can make it easier to add a footnote reference and a footnote close to each other.
73
+
74
+
```md
75
+
Here's a simple footnote,[^1] and here's a longer one.[^bignote]
76
+
77
+
[^1]: This is the first footnote.
78
+
79
+
[^bignote]: This is a bigger footnote with multiple paragraphs and code.
80
+
81
+
Indent paragraphs to include them in the footnote.
82
+
83
+
`{ my code }`
84
+
85
+
Add as many paragraphs as you like.
86
+
```
87
+
88
+
This would be displayed as:
89
+
90
+
<!--
91
+
Breaking into HTML here and deliberately used a new namespace for the links in case someone does
92
+
end up using actual footnotes in this document
93
+
-->
94
+
Here's a simple footnote,<supid="fnref:example:1"><aclass="nhsuk-link"href="#fn:example:1"aria-describedby="footnotes-label">1</a></sup> and here's a longer one.<supid="fnref:example:2"><aclass="nhsuk-link"href="#fn:example:2"aria-describedby="footnotes-label">2</a></sup>
95
+
96
+
<olclass="app-footnotes-list">
97
+
<liid="fn:example:1"><pclass="nhsuk-body">This is the first footnote. <aclass="nhsuk-link"href="#fnref:example:1"aria-label="Back to content">↩︎</a></p>
98
+
</li>
99
+
<liid="fn:example:2"><pclass="nhsuk-body">This is a bigger footnote with multiple paragraphs and code.</p>
100
+
<p class="nhsuk-body">Indent paragraphs to include them in the footnote.</p>
101
+
<p class="nhsuk-body"><code class="app-code app-code--inline">{ my code }</code></p>
102
+
<p class="nhsuk-body">Add as many paragraphs as you like. <a class="nhsuk-link" href="#fnref:example:2" aria-label="Back to content">↩︎</a></p>
103
+
</li>
104
+
</ol>
105
+
66
106
## Lists
67
107
68
108
You can add bullet lists by starting each item of the list with a dash (`-`) character followed by a space. You can also use asterisks (`*`).
0 commit comments