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
| Syntax | Result |
|---|---|
# Heading | Large heading (h1) |
## Subheading | Subheading (h2) |
**bold** | bold |
*italic* | italic |
[Text](https://example.com) | Link |
 | Image |
- item | Bulleted list |
1. item | Numbered list |
> quote | Block quote |
--- | Horizontal rule |
| Text inside single backticks | Inline 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).
- The two
#characters and the space on the first line produce an h2 heading:<h2>Setup</h2>. - Consecutive lines starting with
-become a single list:<ul>with an<li>for each line. **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:
- The project name (
# Project Name) and a one-sentence description. - A
## Installationheading and the commands. - A
## Usageheading and an example. - A
## Licenseheading.
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
- Paragraph: To separate two paragraphs, leave a blank line between them. A single line break does not make a paragraph in most processors; the two lines merge into the same paragraph.
- Forced line break: Putting two spaces at the end of a line produces
<br />. We verified this with the Python processor. - Escaping: If you want to show characters such as
*,_and#as plain text, put\in front of them. For example, the text2 \* 3ends up displayed as 2 * 3. - Underscore: Most processors do not treat an underscore inside a word like
snake_case_wordas emphasis, but the rule can vary from processor to processor.
Differences between processors
Markdown does not behave like a single strict standard; GitHub, CommonMark and other processors have small differences.
| Feature | Point to watch |
|---|---|
| Table | Needs an extension in some processors; the converter on this site does not convert tables |
| Nested list | Two 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 list | May 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
- Make link text meaningful: Instead of "click here," write a phrase that says what opens; it is clearer for both readers and screen readers.
- Image description: The description written inside the square brackets in
is read when the image fails to load and by screen readers. - Relative and absolute addresses: Link to files in the same project with relative paths such as
docs/setup.md, and to outside sites with the full address. - Long addresses: Writing the address in link form keeps the text from breaking, which is tidier than leaving a bare address in the middle of a paragraph.
Short glossary
- Processor (parser): The program or library that reads Markdown and converts it to HTML.
- CommonMark: A specification written to clear up the ambiguous parts of the syntax; many tools approach it.
- README: The introduction and usage file in a project's main directory.
- Inline code: A short piece of code or a command written inside a sentence with single backticks.
Why Markdown?
- It takes a few minutes to learn.
- Because it is plain text, it opens in any editor and versions are easy to compare in version control systems (Git).
- The same content can be converted into different formats (HTML, PDF, e-book).
Common mistakes
- Not leaving a space after the heading mark (
# Headinginstead of#Heading). - 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.
- Not putting a blank line to separate paragraphs; a single line break often does not make a paragraph.
- Not using the escape character
\when you want special characters (*,_,#) shown as text. - 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
- How to Count Words and Characters: A Guide for Homework, Articles and Social Media – How do you count words and characters, with or without spaces, and find reading time? Examples covering emoji, hyphens and limit traps.
- How to Write Text Backwards: Reversing Text Letter by Letter and Palindromes – How do you write text backwards? Reversing by letter or word order, JavaScript and Python code, emoji and Turkish letter pitfalls, palindrome checks.
- How Do You Read Morse Code? Letter and Number Chart, the SOS Signal – What is Morse code, and how are dot and dash durations counted? A to Z letter chart, 0-9 number chart, the SOS signal, and tips for translating Morse.
- What Are Meta Tags and Open Graph? Title, Description, Canonical, and Share Image – What are the title, meta description, canonical, robots meta, Open Graph, and Twitter Card tags? Recommended lengths, example code, and common mistakes.
- What Are HTML Formatting and Minify? Readable Code or a Small File? – How is HTML code indented neatly and what does minify gain? Size, page speed, the gzip/brotli relationship, and risks such as whitespace sensitivity, with examples.
This article is for general information only and is not legal, financial or medical advice. We are not an official institution.