Markdown from scratch · Chapter 2
Emphasis
With asterisks, tildes and backticks around a word you change how it looks. The characters have to sit right against the word, without a space in between.
Making words bold, italic or struck through
The dough must rest for **at least twelve hours**. The flour is *whole wheat*, not white. ~~Yeast~~ Sourdough, please. And this one is ***both***.
The dough must rest for at least twelve hours. The flour is whole wheat, not white. Yeast Sourdough, please. And this one is both.
You can use underscores instead of asterisks too, so __bold__ and _italic_. In the middle of a word, though, only asterisks work.
Showing commands and file names exactly as they are
Whatever sits between two backticks is shown in a fixed font and exactly as it stands. That's handy for commands, file names and anything someone should copy exactly.
Start the container with `docker compose up -d`. The file is called `docker-compose.yml`.
Start the container with docker compose up -d. The file is called docker-compose.yml.
Showing a character without it doing anything
If you want an asterisk to appear simply as an asterisk, put a backslash in front of it. That works with every character that would otherwise mean something in Markdown.
Price: 4 \* 3 euros \# is not a heading here
Price: 4 * 3 euros # is not a heading here
| You write | You get | In the editor |
|---|---|---|
**bold** | bold | Ctrl + B |
*italic* | italic | Ctrl + I |
~~gone~~ | toolbar | |
`code` | code | toolbar |
==yellow== | a highlight, see Highlights | toolbar |
Lore saysWhen you select a word in the editor, a small bar appears above it, and a click on bold sets the asterisks for you.