About us Blog
Get in touch →
← All articles
Technical writing basics

Markdown for technical writers: syntax guide and best practices

A short reference for the Markdown you will use every day, with the habits that keep files tidy in a docs-as-code workflow.

By Docifice · · 4 min read
A Markdown file open in an editor with an outline view of its headings
Key takeaways
  • A handful of Markdown elements covers almost all documentation work.
  • Flavors differ between tools, so check what yours supports.
  • Consistent habits matter more than clever syntax, because files get reviewed as plain text.

Markdown is a way of formatting text using ordinary characters. A pound sign makes a heading, asterisks make bold. It is the standard format for README files and for most docs-as-code projects, which is why it is one of the most useful things a technical writer can learn. If the workflow is new to you, start with what docs as code means.

The syntax you will use daily

Headings and emphasis
# Page title
## Section heading
### Subsection heading

**bold** for interface labels and key terms
*italic* for emphasis, used sparingly
`inline code` for commands, file names and values
Lists
- Bullet item
- Another bullet item

1. First step
2. Second step
3. Third step
Links and images
[Link text](https://example.com)
[Another page](../guides/setup.md)

![Alt text describing the image](images/dashboard.png)
Code blocks
```json
{
  "status": "ok"
}
```
Tables
| Parameter | Type   | Description         |
|-----------|--------|---------------------|
| id        | string | The unique user ID. |
| limit     | number | Maximum results.    |

Habits that keep things clean

Put one sentence per line where your team allows it. It looks odd at first, but reviewers can then see exactly which sentence changed in a pull request. Always name the language on a code block so highlighting works. Write real alt text for images: it helps people using screen readers and shows up when an image fails to load. Use relative links between pages in the same project so they survive a move. And keep headings in order. Do not jump from a level two to a level four because you like the smaller font.

Check what your tool supports

Markdown comes in several flavors. Tables, task lists, callout boxes and footnotes work in some tools and not in others. Before you build a house style around a feature, confirm that your publishing tool renders it.

Common mistakes

Tools that make Markdown easier

ToolWhat it does
VS CodeA free editor with preview and extensions
Markdown lintersCheck for formatting problems automatically
MkDocs, DocusaurusTurn Markdown files into a documentation site
PrettierKeeps formatting consistent across files

A short template for a new page

Page template
# Page title

One sentence saying what this page helps the reader do.

## Before you begin

- Requirement one
- Requirement two

## Steps

1. First step.
2. Second step.

## Troubleshooting

Describe common problems and fixes.

## Related topics

- [Next guide](next-guide.md)

A shared template keeps pages consistent and gives new contributors somewhere to start. For the wider workflow around the files, see what docs as code means.

Writing for review in plain text

Because Markdown files are reviewed as plain text in a pull request, small habits make a big difference to reviewers. Keep each change focused on one purpose, so a reviewer can read the whole diff in a few minutes. Avoid reformatting a whole file when you only meant to fix one paragraph, since the diff then hides your real edit among hundreds of changed lines.

Write a short pull request description saying what changed and why, and name anyone who needs to confirm technical accuracy. Preview the rendered page before asking for review, because a missing blank line or a mis-indented list is much easier to spot on screen than in raw text.

Tables, callouts and other extras

Plain Markdown has no callout boxes, but many documentation tools add them through extensions, often using a syntax like a blockquote with a label, or special fenced blocks. Check your generator's documentation and use one style across the whole project. For tables, keep them small. A table with more than four or five columns is hard to read on a phone, and often works better as a list of short sections.

Markdown is the base of most docs-as-code setups. We set these up as part of our documentation engineering work, and our embedded technical writers are comfortable working in Git and Markdown from the first day.

Is Markdown enough for a large documentation set?

Yes, with a static site generator such as MkDocs or Docusaurus, which adds navigation, search and theming on top of the files.

What if Markdown is missing a feature?

Many tools extend it, and some allow raw HTML or custom components for things like tabs and callouts.

How long does it take to learn Markdown?

Most people learn the basics in an hour and feel comfortable within a week of regular use.

What is the difference between Markdown and MDX?

MDX allows you to use components inside Markdown, which is useful for tabs, callouts and interactive examples. It is supported by tools like Docusaurus.

Should we use Markdown or a WYSIWYG editor?

Markdown works well for teams using Git and review workflows. A visual editor can suit teams who write occasionally and do not want to learn syntax.

How do I add a note or warning box in Markdown?

Standard Markdown has no such feature. Most documentation tools provide an extension or custom syntax for it, so check the one you use.

Can I use HTML inside Markdown?

Most processors allow it, but it makes files harder to read and can break in some tools. Use it only when Markdown cannot do the job.

Ready when you are

Need help with documentation?

Tell us what you are working on. We will tell you how we would approach it.