Spaces:
Sleeping
Sleeping
File size: 9,026 Bytes
c63ff03 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 |
---
aliases:
- How to/Format your notes
- Markdown
---
Learn how to apply basic formatting to your notes, using [Markdown](https://daringfireball.net/projects/markdown/). For more advanced formatting syntax, refer to [[Advanced formatting syntax]].
## Paragraphs
To create paragraphs, use a blank line to separate one or more lines of text.
```
This is a paragraph.
This is another paragraph.
```
> [!note]- Multiple blank spaces
> Multiple adjacent blank spaces in and between paragraphs collapse to a single space when displaying a note in [[Edit and preview Markdown#Editor views|Reading view]] and on [[Introduction to Obsidian Publish|Obsidian Publish]] sites.
>
> ```md
> Multiple adjacent spaces
>
>
>
> and multiple newlines between paragraphs.
> ```
>
> > Multiple adjacent spaces
> >
> >
> >
> > and multiple newlines between paragraphs.
>
> If you want to add multiple spaces, you can add ` ` (blank space) and `<br>` (newline) to your note.
## Headings
To create a heading, add up to six `#` symbols before your heading text. The number of `#` symbols determines the size of the heading.
```md
# This is a heading 1
## This is a heading 2
### This is a heading 3
#### This is a heading 4
##### This is a heading 5
###### This is a heading 6
```
%% These headings use HTML to avoid cluttering the Outline/Table of contents %%
<h1>This is a heading 1</h1>
<h2>This is a heading 2</h2>
<h3>This is a heading 3</h3>
<h4>This is a heading 4</h4>
<h5>This is a heading 5</h5>
<h6>This is a heading 6</h6>
## Bold, italics, highlights
Text formatting can also be applied using [[Editing shortcuts]].
| Style | Syntax | Example | Output |
|-|-|-|-|
| Bold | `** **` or `__ __` | `**Bold text**` | **Bold text** |
| Italic | `* *` or `_ _` | `*Italic text*` | *Italic text* |
| Strikethrough | `~~ ~~` | `~~Striked out text~~` | ~~Striked out text~~ |
| Highlight | `== ==` | `==Highlighted text==` | ==Highlighted text== |
| Bold and nested italic | `** **` and `_ _` | `**Bold text and _nested italic_ text**` | **Bold text and _nested italic_ text** |
| Bold and italic | `*** ***` or `___ ___` | `***Bold and italic text***` | ***Bold and italic text*** |
## Internal links
Obsidian supports two formats for [[internal links]] between notes:
- Wikilink: `[[Three laws of motion]]`
- Markdown: `[Three laws of motion](Three%20laws%20of%20motion.md)`
## External links
If you want to link to an external URL, you can create an inline link by surrounding the link text in brackets (`[ ]`), and then the URL in parentheses (`( )`).
```md
[Obsidian Help](https://help.obsidian.md)
```
[Obsidian Help](https://help.obsidian.md)
You can also create external links to files in other vaults, by linking to an [[Obsidian URI|Obsidian URI]].
```md
[Note](obsidian://open?vault=MainVault&file=Note.md)
```
### Escape blank spaces in links
If your URL contains blank spaces, you must escape them by replacing them with `%20`.
```md
[My Note](obsidian://open?vault=MainVault&file=My%20Note.md)
```
You can also escape the URL by wrapping it with angled brackets (`< >`).
```md
[My Note](<obsidian://open?vault=MainVault&file=My Note.md>)
```
## External images
You can add images with external URLs, by adding a `!` symbol before an [[#External links|external link]].
```md

```

You can change the image dimensions, by adding `|640x480` to the link destination, where 640 is the width and 480 is the height.
```md

```
If you only specify the width, the image scales according to its original aspect ratio. For example:
```md

```
> [!tip]
> If you want to add an image from inside your vault, you can also [[Embed files#Embed an image in a note|embed an image in a note]].
## Quotes
You can quote text by adding a `>` symbols before the text.
```md
> Human beings face ever more complex and urgent problems, and their effectiveness in dealing with these problems is a matter that is critical to the stability and continued progress of society.
\- Doug Engelbart, 1961
```
> Human beings face ever more complex and urgent problems, and their effectiveness in dealing with these problems is a matter that is critical to the stability and continued progress of society.
\- Doug Engelbart, 1961
> [!tip]
> You can turn your quote into a [[Callouts|callout]] by adding `[!info]` as the first line in a quote.
## Lists
You can create an unordered list by adding a `-`, `*`, or `+` before the text.
```md
- First list item
- Second list item
- Third list item
```
- First list item
- Second list item
- Third list item
To create an ordered list, start each line with a number followed by a `.` symbol.
```md
1. First list item
2. Second list item
3. Third list item
```
1. First list item
2. Second list item
3. Third list item
### Task lists
To create a task list, start each list item with a hyphen and space followed by `[ ]`.
```md
- [x] This is a completed task.
- [ ] This is an incomplete task.
```
- [x] This is a completed task.
- [ ] This is an incomplete task.
You can toggle a task in Reading view by selecting the checkbox.
> [!tip]
> You can use any character inside the brackets to mark it as complete.
>
> ```md
> - [x] Milk
> - [?] Eggs
> - [-] Eggs
> ```
>
> - [x] Milk
> - [?] Eggs
> - [-] Eggs
### Nesting lists
All list types can be nested in Obsidian.
To create a nested list, indent one or more list items:
```md
1. First list item
1. Ordered nested list item
2. Second list item
- Unordered nested list item
```
1. First list item
1. Ordered nested list item
2. Second list item
- Unordered nested list item
Similarly, you can create a nested task list by indenting one or more list items:
```md
- [ ] Task item 1
- [ ] Subtask 1
- [ ] Task item 2
- [ ] Subtask 1
```
- [ ] Task item 1
- [ ] Subtask 1
- [ ] Task item 2
- [ ] Subtask 1
Use `Tab` or `Shift+Tab` to indent or unindent one or more selected list items for easy organization.
## Horizontal rule
You can use three or more stars `***`, hyphens `---`, or underscore `___` on its own line to add a horizontal bar. You can also separate symbols using spaces.
```md
***
****
* * *
---
----
- - -
___
____
_ _ _
```
***
## Code
You can format code both inline within a sentence, or in its own block.
### Inline code
You can format code within a sentence using single backticks.
```md
Text inside `backticks` on a line will be formatted like code.
```
Text inside `backticks` on a line will be formatted like code.
If you want to put backticks in an inline code block, surround it with double backticks like so: inline ``code with a backtick ` inside``.
### Code blocks
To format a block of code, surround the code with triple backticks.
~~~
```
cd ~/Desktop
```
~~~
```md
cd ~/Desktop
```
You can also create a code block by indenting the text using `Tab` or 4 blank spaces.
```md
cd ~/Desktop
```
You can add syntax highlighting to a code block, by adding a language code after the first set of backticks.
~~~md
```js
function fancyAlert(arg) {
if(arg) {
$.facebox({div:'#foo'})
}
}
```
~~~
```js
function fancyAlert(arg) {
if(arg) {
$.facebox({div:'#foo'})
}
}
```
Obsidian uses Prism for syntax highlighting. For more information, refer to [Supported languages](https://prismjs.com/#supported-languages).
> [!note]
> [[Edit and preview Markdown#Source mode|Source mode]] and [[Edit and preview Markdown#Live Preview|Live Preview]] do not support PrismJS, and may render syntax highlighting differently.
## Footnotes
You can add footnotes[^footnote] to your notes using the following syntax:
[^footnote]: This is a footnote.
```md
This is a simple footnote[^1].
[^1]: This is the referenced text.
[^2]: Add 2 spaces at the start of each new line.
This lets you write footnotes that span multiple lines.
[^note]: Named footnotes still appear as numbers, but can make it easier to identify and link references.
```
You can also inline footnotes in a sentence. Note that the caret goes outside the brackets.
```md
You can also use inline footnotes. ^[This is an inline footnote.]
```
> [!note]
> Inline footnotes only work in reading view, not in Live Preview.
## Comments
You can add comments by wrapping text with `%%`. Comments are only visible in Editing view.
```md
This is an %%inline%% comment.
%%
This is a block comment.
Block comments can span multiple lines.
%%
```
## Learn more
To learn more advanced formatting syntax, such as tables, diagrams, and math expressions, refer to [[Advanced formatting syntax]].
To learn more about how Obsidian parses Markdown, refer to [[Obsidian Flavored Markdown]].
|