Skip to content
All references

Writing reference

Markdown Syntax

Search practical Markdown examples for notes and documentation, with CommonMark and GFM differences explained.

Move a short document into Markdown without losing its structure

Markdown stores document structure in readable text, but its available features depend on the renderer. CommonMark defines a core syntax, while GitHub Flavored Markdown adds features such as tables. Decide where the document will be published before relying on an extension that another preview may not support.

Start with real headings, descriptive links, meaningful list order and explicit code fences. Do not use a heading merely to make a sentence visually larger or a table merely to force a layout. A document that is structurally clear in plain text is easier to maintain and usually transfers more reliably between renderers.

  1. Outline the document using heading levels that describe its organization. Keep the hierarchy understandable when the page is read without styling.
  2. Convert emphasis, lists and links, then preview the result in the actual destination renderer.
  3. Put code inside fenced blocks so punctuation is treated as source. Check that copied snippets contain everything needed for their stated example.
  4. Review image descriptions and link destinations separately from how the preview looks. A well-formatted link can still point to the wrong place.

Create a compact maintenance note

Example input

## Before release

- Run the checks.
- Read the [change notes](https://example.com/changes).

Expected result

h2 → ul → a

The document has a second-level heading, an unordered list and a descriptive link. The output describes its structure rather than reproducing a screenshot. If you convert HTML into Markdown, compare the resulting structure with the original intent; visual columns, interactive controls and complex styling do not have equivalent Markdown features.

Check before you continue

  • A local preview can differ from a wiki, repository host or static-site generator. Verify tables, raw HTML and line-break behavior in the destination.
  • Relative links are interpreted from the published document's location. A path that works in a local folder can be broken after deployment.
  • Do not interpret a preview as a security review of arbitrary HTML or URLs. Inspect unfamiliar source before embedding it elsewhere.

9 of 9 entries

Structure

Headings

# Project notes

## Installation

Use one to six # characters followed by a space. Leave a blank line around headings for clarity.

Text

Emphasis

*emphasis* and **strong emphasis**

Single markers emphasize text; double markers apply strong emphasis.

Text

Links

[Documentation](https://example.com/docs)

Use descriptive link text and a destination in parentheses.

Text

Images

![A green leaf](./leaf.png)

The bracketed text describes the image for readers who cannot see it.

Structure

Lists

- Read the guide
- Try the example

1. Prepare
2. Export

Indent nested items consistently. Exact nesting depends on the parent marker width.

Text

Code

Use `const answer = 42` inline.

```js
console.log(answer);
```

Backticks protect inline source; fenced blocks can include a language label.

Structure

Quotes

> A short quoted note.

Prefix quoted lines with >. Attribution remains your responsibility.

Extensions

Tables (GFM)

| Item | Count |
| --- | ---: |
| Notes | 3 |

Pipe tables are a GFM extension, not core CommonMark. A trailing colon right-aligns a column.

Extensions

Task lists (GFM)

- [x] Draft
- [ ] Review

Task checkboxes require GFM support. Markdown Preview supports GFM.