Markdown in ten minutes
Markdown lets you write formatted text in plain files: headings, lists, links, code and tables. Write one, preview it, and see where it is used.
Markdown lets you write formatted text in plain files: headings, lists, links, code and tables. Write one, preview it, and see where it is used.
In plain words
Markdown is writing with a few typewriter tricks. Put a # in front of a line and it becomes a heading; wrap a word in stars and it becomes bold. The file stays plain text, and a program turns the tricks into a nice page.
Try it yourself
Create notes.md in a folder of your own and put this in it:
# My notes
Today I learned about **JSON** and `curl`.
- first thing
- second thing
1. step one
2. step two
[An example](https://example.com)
| Code | Meaning |
|---|---|
| 200 | fine |
| 404 | not found |
Open the preview in the editor: press Ctrl+K, then V (or right-click the file tab, Open Preview to the Side). Change a line and watch the preview change.
A step further
Fenced code blocks keep your formatting. Put three backticks, the language, the code, and three backticks again. - [ ] task makes a checklist. A blank line starts a new paragraph, and two spaces at the end of a line make a line break.
Where you already meet it: documentation sites, every README.md on GitHub, and pull request descriptions.
How it works in real projects
Documentation lives in the repository as Markdown, next to the code, so it is reviewed and versioned like code. It also reads well as plain text in a terminal.