Obsidian School

How to add code blocks to Obsidian.md

Code blocks (Sometimes called Code Fences) are useful for two reasons: one, the code is not compiled in your editor. Two, the code will in most cases have proper syntax highlighting.

To insert a code block use the ` (Found Under your escape key usually) followed by the programming language you want to use. For example:

```html
some code here
```

Discover Similar Lessons

What is Obsidian.md?

Obsidian.md is a markdown text editor. It is different from other markdown editors because it has jumped on the linked thought band wagon. “Linked

Read More

Obsidian Basics

Learn about basic Markdown formatting and other basic Obsidian.md features.

Obsidian Intermediate

Learn about intermediate Obsidian.md features such as Dataview, search querying, yaml and metafields.

Obsidian PKM

Learn about Personal Knowledge Management (PKM) concepts and how to implement these concepts in your own system.