Code
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++.
This is a demo post on qua.name; see About this demo.