Demo

markdown

WriteFreely posts are written in Markdown: plain text with a few conventions for formatting. Each example below shows what you type, then what you get.

Headings

Start a line with one or more # signs and a space. The post's own title is set separately, so inside a post you will mostly use two or three.

### A small heading
#### An even smaller one

A small heading

An even smaller one

Emphasis

*Italic*, **bold**, ***both*** and ~~struck through~~.

Italic, bold, both and struck through.

Underscores work too (_italic_), but they also act inside words, so put names like file_name_here in backticks (see Code).

Lists

- Paper
- Pens
  - Fountain pen
  - Pencil

1. Write
2. Read it again
3. Publish
  • Paper
  • Pens
    • Fountain pen
    • Pencil
  1. Write
  2. Read it again
  3. Publish

Quotes

> The first draft of anything is rubbish.
>
> > A quote inside a quote.

The first draft of anything is rubbish.

A quote inside a quote.

Read the [writer's guide](https://writefreely.org/docs/latest/writer),
or paste a bare address: https://writefreely.org

Read the writer's guide, or paste a bare address: https://writefreely.org

Links to other posts on the same blog can be short, like [Start here](/demo/start-here).

Horizontal rule

Three hyphens on a line of their own, with a blank line above:

Above the line.

---

Below the line.

Above the line.


Below the line.

Tables

Colons in the second row set the alignment of a column.

| Format   | Dates shown | Order         |
|----------|:-----------:|---------------|
| Blog     | yes         | newest first  |
| Novel    | no          | oldest first  |
| Notebook | no          | newest first  |
Format Dates shown Order
Blog yes newest first
Novel no oldest first
Notebook no newest first

A little HTML

Some HTML is allowed as well, for things Markdown has no syntax for. Scripts are removed.

H<sub>2</sub>O, E = mc<sup>2</sup>, a <mark>highlighted</mark> word
and <abbr title="Markdown">MD</abbr> with a tooltip.

H2O, E = mc2, a highlighted word and MD with a tooltip.

Typography for free

Straight “quotes” are turned into curly ones, and two hyphens — like that — become a dash. In code they are left alone.

Not supported

Footnotes and task-list checkboxes are not part of WriteFreely's Markdown; [^1] and [ ] stay as plain text.

#markdown #writing

This is a demo post on qua.name; see About this demo.

Put short bits of code inside a sentence between backticks: git status, file_name_here, <br>. Inside backticks nothing is formatted, so underscores, asterisks and angle brackets stay as typed.

Code blocks

For longer code, put three backticks on the line above and below. Add a language name right after the opening backticks to get syntax highlighting:

```python
def greet(name):
    return f"Hello, {name}!"
```

This becomes:

def greet(name):
    return f"Hello, {name}!"

Without a language name the block is shown as plain monospaced text:

No language given, so no colours.
    Indentation and   spacing are kept.

A few more languages

package main

import "fmt"

func main() {
	fmt.Println("Hello from Go")
}
# back up the drafts folder
tar czf drafts-$(date +%F).tar.gz ~/drafts
(defun count-words-in-buffer ()
  "Show the number of words in the buffer."
  (interactive)
  (message "%d words" (count-words (point-min) (point-max))))
<p class="note">Hello, <em>world</em>.</p>
SELECT title, created FROM posts WHERE created > '2026-01-01' ORDER BY created DESC;

Which language names work?

Highlighting is done in your reader's browser by highlight.js, and only for blocks that have a language name. WriteFreely ships highlight.js language files for about 180 languages, from bash, c, cpp, css, go, java, javascript, json, python, ruby, rust, sql and yaml to fortran, haskell, lisp, ocaml and x86asm.

It also understands a few short forms: sh for bash, js and jsx for JavaScript, html for HTML/XML, and c, h or c++ for C/C++.

#code #markdown

This is a demo post on qua.name; see About this demo.

This blog has MathJax switched on (in the blog settings, under Text Rendering), so you can write formulas in TeX notation and they are typeset in the reader's browser.

Inline formulas

Wrap a formula in single dollar signs, or in \\( and \\):

Pythagoras: $a^2 + b^2 = c^2$, and Euler: \\(e^{i\pi} + 1 = 0\\).

Pythagoras: $a^2 + b^2 = c^2$, and Euler: \(e^{i\pi} + 1 = 0\).

Displayed formulas

Use double dollar signs, or \\[ and \\], for a formula on its own line:

$$
x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}
$$

\\[ \int\_{-\infty}^{\infty} e^{-x^2} \, dx = \sqrt{\pi} \\]

$$ x = \frac{-b \pm \sqrt{b^2-4ac}}{2a} $$

\[ \int_{-\infty}^{\infty} e^{-x^2} \, dx = \sqrt{\pi} \]

A sum and a matrix:

$$
\sum\_{k=1}^{n} k = \frac{n(n+1)}{2}
\qquad
\begin{pmatrix} a & b \\\\ c & d \end{pmatrix}
$$

$$ \sum_{k=1}^{n} k = \frac{n(n+1)}{2} \qquad \begin{pmatrix} a & b \\ c & d \end{pmatrix} $$

Markdown goes first

Your post is turned from Markdown into HTML before MathJax sees it, and Markdown has its own uses for some characters. That is why the examples above look a little odd:

  • A backslash in front of punctuation is a Markdown escape and disappears. Where TeX needs one, type two: \\(, \\[, \\{, and four for a line break, \\\\.
  • Underscores and asterisks can turn into italics. Write \_ and \* inside formulas.
  • A hyphen with spaces on both sides becomes a dash, so write b^2-4ac rather than b^2 - 4ac.
  • With dollar signs switched on, two prices in one paragraph look like a formula. Write \$ for a literal dollar sign: it costs \$5, or \$10 for two.

The editor's Preview shows the Markdown result but does not typeset formulas; open the published post to see those.

Where formulas don't render

MathJax runs on the blog's own pages. Elsewhere, for example in a Mastodon timeline, readers see the TeX source instead.

#maths #markdown

This is a demo post on qua.name; see About this demo.

WriteFreely does not store images itself. You put the picture somewhere on the web (your own site, a photo host, any address that serves the image file) and paste its URL into your post.

Adding an image

![Close-up of the gold nib of a black fountain pen over a page of handwriting in black ink](https://qua.name/img/demo/fountain-pen.jpg)

Close-up of the gold nib of a black fountain pen over a page of handwriting in black ink

Writing with a fountain pen. Photo: Petar Milosevic, CC BY-SA 4.0, via Wikimedia Commons.

The text in the square brackets is the alt text: a short description for people who can't see the picture. Write it for every image. When the post goes out to the fediverse, WriteFreely attaches the image and sends the alt text along as its description. That only works with the Markdown syntax above, not with an HTML <img> tag.

WriteFreely has no caption field, so the credit lines on this page are just an italic paragraph under each picture.

Hovering and linking

A text in quotes after the URL becomes a tooltip. Wrap the whole image in a link to make it clickable, for example to open the full-size picture:

[![A large octagonal reading room under a white dome with skylights, seen from a high balcony, with rows of desks radiating from the centre](https://qua.name/img/demo/reading-room.jpg "La Trobe Reading Room")](https://qua.name/img/demo/reading-room.jpg)

A large octagonal reading room under a white dome with skylights, seen from a high balcony, with rows of desks radiating from the centre

La Trobe Reading Room, State Library of Victoria, Melbourne, seen from the 5th floor. Photo: Diliff, CC BY 2.5, via Wikimedia Commons.

Old pictures, too

Black-and-white photo of a young woman in a hat working a large calculating machine with many rows of keys, while men in suits and bowler hats look on

Paris, 24 April 1921: the first contest of calculating machines (Magic City, rue de l'Universite). Photo: Agence Rol, public domain, via Wikimedia Commons.

If you use pictures made by someone else, check the licence and credit them the way it asks.

Video, audio and embeds

There is no embed button. WriteFreely does let a few HTML elements through: <video> and <audio> for media files you host somewhere, and <iframe> for players from other sites. Scripts are always removed, so embeds that need JavaScript in the page itself won't work.

This blog doesn't show an embedded player, because most video sites track their visitors. A plain link to the video does the job, and lets your readers choose.

#images #markdown

This is a demo post on qua.name; see About this demo.

Two small things that help readers find their way: hashtags group posts by topic, and a “read more” marker keeps long posts from taking over the blog's front page.

You are reading the short version of this post. On the blog's front page it stops after this paragraph, with a Read more... link underneath.

Read more...