Tech News, Tech & Coding · Free Online Tools

IT Question Answer
Tools
Back to HTML & CSS

Markdown Syntax Guide for Beginners

Markup Languages & MarkdownBy Muhammad Fareed
markdownsyntaxdocumentationbeginners

Short answer: Markdown uses simple symbols to format text: hash signs for headings, asterisks for bold and italic, hyphens for lists, square and round brackets for links, and backticks for code. You write plain text and a processor turns it into HTML.

Headings, bold and italic

# Heading level 1
## Heading level 2
### Heading level 3

**bold text**
*italic text*
~~strikethrough~~ (in many flavors)

Use one level-1 heading for the page title, then levels 2 and 3 for sections.

Lists

- Bullet item
- Another item
  - Nested item

1. First step
2. Second step
3. Third step

- [x] Task done
- [ ] Task to do

Task lists work in GitHub Flavored Markdown and some other tools.

Links and images

[Link text](https://example.com)

![Alt text for the image](image.png)

Always write useful alt text for images, since it helps screen reader users and appears if the image fails to load.

Code

Wrap short code in single backticks, and blocks in three backticks with an optional language name:

Use `npm install` to add packages.

```js
console.log("Hello");
```

Quotes, rules and tables

> A quoted sentence.

---

| Name  | Role      |
|-------|-----------|
| Aisha | Developer |
| Omar  | Designer  |

Tables are part of GitHub Flavored Markdown. The pipes do not need to line up perfectly, but aligning them makes the source easier to read.

Tips

  • Leave a blank line between paragraphs and before lists.
  • Escape special characters with a backslash when you want them to show literally, such as \*.
  • Preview your document, since each tool may render some details differently.
  • Use plain HTML inside Markdown only when you need something Markdown cannot do.

Extended syntax you may meet

  • Footnotes: supported by some processors, written as [^1].
  • Definition lists, highlight and emoji: available in certain tools only.
  • Front matter: a block of YAML at the top of a file, used by static site generators for titles and dates.
  • Math and diagrams: some platforms render LaTeX math and Mermaid diagrams inside code blocks.

If you need maximum compatibility, stick with the core syntax above.

Good editors and previews

VS Code has a built-in Markdown preview. Obsidian and Typora give live formatting, and GitHub shows a rendered preview of README.md files. Previewing as you write helps you catch missing blank lines and broken links.

Key takeaways

  • A handful of symbols covers most writing: hash signs, asterisks, hyphens, brackets and backticks.
  • Leave blank lines between blocks, and preview your file before publishing.
  • Tables, task lists and other extras depend on the Markdown flavor your tool supports.
  • Use plain HTML inside Markdown only when you need something it cannot express.

Frequently asked questions

Where is Markdown used?

In GitHub README files, documentation sites, note apps, static site generators, chat tools and many content management systems.

What is the difference between Markdown and GitHub Flavored Markdown?

GitHub Flavored Markdown extends the standard with tables, task lists, strikethrough and automatic links, among other features.

What file extension do Markdown files use?

Usually .md, and sometimes .markdown.