How to format text in questions and answers? (What is Markdown?)

Viewed 4

The "How to Format" panel on the right shows some ways of formatting text, what is all that about? And does that have anything to do with something called Markdown?

1 Answers

Yes, the formatting is based on Markdown, an actually pretty simple way to format text. When you compose text here, a preview of it is shown below the edit pane already. Here's a quick demo on Markdown:

Header 1

Header 2

Header 3

Simple formating

italic, another italic, bold, both, strikethough

Lists

  • bullet
  • another bullet
    • nested bullet
  1. step one
  2. step two

A. Item A
B. Item B

We can also link websites, such as the link of this forum. Or if it is an online image, we can add a ! in front.

Code blocks

If you want blocky (i.e. monospaced) characters that look like code, use back ticks like this.

But if you need a whole code block, start and end the block with three backticks:

# Comments work too!
curl wttr.in    # This checks the weather in your terminal!

This is great for making text copy-able.

Tables

Yes, we can do tables too, well, just a simple one:

Feature Symbol
bold **
italic * or _

Quotes

This is a quote, great for making a point.

Full Guide on Markdown

The Markdown Cheatsheet.