How to use it
- Download the file.
- Open it in the reader to see it formatted. Nothing is uploaded.
- Open the same file in a text editor, like Notepad, TextEdit or VS Code.
- Read the two side by side. Each section tells you what to look for.
- Change something and look again. The fastest way to learn is to break it.
What is inside
Here are a few parts of the file, as the source and as the page.
Headings and emphasis
You write
## Emphasis
Two asterisks make **bold text**. One makes *italic text*. Three make
***bold and italic***. Two tildes make ~~struck through~~ text.You see
Emphasis
Two asterisks make bold text. One makes italic text. Three make
bold and italic. Two tildes make struck through text.
Lists and tasks
You write
- Bread
- Milk
- Indent two spaces to nest a line under the one above
- [x] Write the draft
- [ ] Send it for reviewYou see
-
Bread
-
Milk
- Indent two spaces to nest a line under the one above
-
Write the draft
-
Send it for review
A table with alignment
The colons in the line of dashes set each column's alignment: left, center and right.
You write
| Fruit | Color | Price |
| :----- | :----: | ----: |
| Apple | Red | $1.20 |
| Banana | Yellow | $0.50 |You see
| Fruit | Color | Price |
|---|---|---|
| Apple | Red | $1.20 |
| Banana | Yellow | $0.50 |
Code with colors
You write
```python
def greet(name):
return f"Hello, {name}"
```You see
def greet(name):
return f"Hello, {name}"A callout
You write
> [!TIP]
> Keep this file open next to your own while you learn.You see
Tip
Keep this file open next to your own while you learn.
Example file or sample file?
This site has two downloadable files, and they do different jobs.
- This example file teaches. It explains itself as it goes, and it only uses Markdown you would write in a real document.
- The sample Markdown file tests. It is built to find the places a Markdown renderer goes wrong, including unsafe HTML that should be refused. Use it to check an app, not to learn.
Questions
What is a .md file example?
A .md file is a plain text file written in Markdown. This page's download
is one: open it in any text editor to see what a .md file looks like inside.
Can I use this file in my own project?
Yes. It is free to copy, change and share.
Why does the top of the file have lines between dashes?
That block is frontmatter, details about the file such as its title. Most Markdown apps hide it. You can delete it if you do not need it.
Why does a feature not show in my app?
Basic Markdown works everywhere. Callouts, maths and diagrams need an app that supports them, such as GitHub or MarkdownPaper. In other apps they show as plain text.
Next
- Markdown tutorial for beginners, which builds a document step by step.
- Open any .md file as a page on your computer or phone.