TR

Home / Guides / What Is Markdown and How Do You Write It? Syntax, a README Example and HTML Conversion

What Is Markdown and How Do You Write It? Syntax, a README Example and HTML Conversion

Updated: November 6, 2026 · AracMerkezi

▶ Open Markdown to HTML Converter

Markdown is a lightweight text format that lets you write formatting such as headings, lists and emphasis with simple marks. It can be read as a plain text file, and when needed it can be converted to HTML and shown as a web page. README files on GitHub, developer documentation, note-taking apps and many blog systems use Markdown. In this guide, we will see the syntax in a table, convert two small documents to HTML line by line, and point out the differences between various Markdown processors.

Basic syntax

SyntaxResult
# HeadingLarge heading (h1)
## SubheadingSubheading (h2)
**bold**bold
*italic*italic
[Text](https://example.com)Link
![Description](image.png)Image
- itemBulleted list
1. itemNumbered list
> quoteBlock quote
---Horizontal rule
Text inside single backticksInline code

The heading level equals the number of # characters: one # makes an h1, two make an h2. Using a single h1 per page and moving through subheadings in order is a good habit for both readability and search engines.

Code block

Lines opened and closed with three backtick characters become a code block and are shown without formatting. This is ideal for programming examples. To show a single command or file name inside a sentence, use inline code.

Example 1: Converting a three-line document to HTML

The input is three lines: the heading line ## Setup, a first item - **Node** is required, and a second item that shows the command inside single backticks (npm install).

  1. The two # characters and the space on the first line produce an h2 heading: <h2>Setup</h2>.
  2. Consecutive lines starting with - become a single list: <ul> with an <li> for each line.
  3. **Node** becomes <strong>Node</strong>; text in single backticks becomes <code>npm install</code>.

With the same rules, the text **bold** and *italic* turns into <strong> and <em> tags inside a paragraph; we tried this with the Markdown library in Python and the output was <p><strong>bold</strong> and <em>italic</em></p>, as expected.

Example 2: A simple README outline

A good README often follows the same order:

  1. The project name (# Project Name) and a one-sentence description.
  2. A ## Installation heading and the commands.
  3. A ## Usage heading and an example.
  4. A ## License heading.

This structure can be built in about ten lines. A reader finds what they are looking for quickly by scanning the headings, because Markdown carries the structure in its marks and needs no extra formatting.

Line breaks, paragraphs and the escape character

Differences between processors

Markdown does not behave like a single strict standard; GitHub, CommonMark and other processors have small differences.

FeaturePoint to watch
TableNeeds an extension in some processors; the converter on this site does not convert tables
Nested listTwo spaces are not enough in some processors; four-space indentation is safe everywhere
Space in heading#Heading becomes a heading in some processors; not in those that follow the CommonMark rule
Task listMay require an extension

We saw the nested-list difference by testing the Markdown processor in Python: a sub-item written with two spaces was merged into the main list as a flat item, while with four spaces it was truly nested. That is why previewing on the platform where you will publish the document is important.

Writing links and images

Short glossary

Why Markdown?

Common mistakes

  1. Not leaving a space after the heading mark (# Heading instead of #Heading).
  2. Not leaving a blank line before a list. In the processor we tested, items written directly under a paragraph did not become a list and were treated as a continuation of the paragraph.
  3. Not putting a blank line to separate paragraphs; a single line break often does not make a paragraph.
  4. Not using the escape character \ when you want special characters (*, _, #) shown as text.
  5. Expecting the same output on every platform; you need to preview on the target platform before publishing.

When to use it and its limits

Markdown is excellent for text-heavy content such as documents, notes, documentation and blog posts. For complex page layout, colored tables or content that needs precise placement, HTML or a page editor is more suitable. The converter on this site supports headings, bold, italic, code, links, lists, quotes and code blocks; it does not convert advanced elements such as tables.

A practical workflow might look like this: first write the draft as plain text, then look at the HTML output in the converter, click the links one by one to test them, measure the length with the counter, and finally preview on the platform where you will publish. When you keep the same file in Git, you can see which line changed and return to an earlier version; this is one of Markdown's biggest advantages over binary formats such as Word.

Converting to HTML

To add the Markdown you wrote to your website, you can use the Markdown → HTML Converter. To see the difference between two versions, look at the Text Comparison tool, and to measure the length of your writing, the Word Counter. If you are moving between data formats, the JSON guide and the YAML guide may also help.

Frequently asked questions

How do I write a heading in Markdown?

Put # at the start of the line and leave a space; ## makes a subheading and ### the next level down.

How do I add a link in Markdown?

In the form [Text](https://example.com); the square brackets hold the visible text and the parentheses hold the address.

Can Markdown be converted to HTML?

Yes; converter tools turn headings, lists, links and code blocks into HTML. Support for advanced elements such as tables varies by processor.

Tools mentioned in this guide

More guides

This article is for general information only and is not legal, financial or medical advice. We are not an official institution.