Markdown: Introduction to Markdown and Its Core Advantages
Markdown is a lightweight markup language that lets you write well-structured documents in plain text — think of it as adding "formatting marks" to your text and letting the computer handle the layout.
1. What You'll Learn
- What Markdown is and the problem it solves
- The relationship between Markdown and HTML
- The four core advantages of Markdown
- Common use cases for Markdown
- How to decide if Markdown fits your needs
2. A Developer's Real Story
(1) Pain Point: Writing Docs Was More Painful Than Coding
Alex is a newly hired developer who was asked to write a README file for a project. He opened Word, spent half an hour tweaking font sizes, line spacing, and numbering, only to find the formatting completely broken when he saved it. Worse, his colleague's text editor couldn't even open the .docx file. Alex spent an entire afternoon on formatting — the actual content took only 20 minutes.
(2) Solution: One Go With Markdown
Mike, a senior developer on the team, saw this and taught Alex to rewrite the README in Markdown. By adding just a few # and * symbols to plain text, Alex could generate clean headings, lists, and code blocks. The entire file was only 3 KB, could be opened in any editor, and rendered into a beautiful page after pushing to GitHub. From then on, Alex's document writing time dropped by 70%.
3. What Is Markdown
Markdown is a lightweight markup language created by John Gruber in 2004. Its core philosophy is "easy to read, easy to write" — you express formatting with simple symbols (like #, *, -), and the raw text remains clear and readable even without rendering to HTML.
graph LR
A[Plain-text .md file] --> B[Markdown Parser]
B --> C[HTML Output]
C --> D[Browser Rendering]
D --> E[User sees formatted page]
| Aspect | Markdown | Word | HTML |
|---|---|---|---|
| Learning curve | 5 minutes | 30 minutes (basics) | 2 hours (basics) |
| File size | 1–5 KB/lesson | 50–500 KB | 10–50 KB |
| Version control | ✅ Great (plain text) | ❌ Binary diff is hard | ✅ Possible |
| Cross-platform | ✅ Any editor | ❌ Requires Office | ✅ Any browser |
| Focus on content | ✅ Just write | ❌ Constant formatting | ⚠️ Tags needed |
(1) The Concept of a Lightweight Markup Language
A markup language uses specific symbols to describe document structure. HTML is powerful but verbose — to write a heading, you need <h1> at the start and </h1> at the end. With Markdown, a single # gives you a top-level heading:
# This is a level-1 heading
## This is a level-2 heading
(2) The Relationship Between Markdown and HTML
Markdown isn't a replacement for HTML — it's a simplified version. Markdown is ultimately parsed into HTML. In fact, you can embed HTML tags directly inside Markdown:
## Markdown to HTML Conversion
Markdown source: `# Hello`
Converted HTML: `<h1>Hello</h1>`
You can use HTML directly within Markdown:
<span style="color: red;">This uses an HTML tag</span>
▶ Example: How a Markdown Snippet Becomes HTML
# Welcome to Markdown
Markdown makes writing **easy**.
* No need to worry about formatting
* Focus on content creation
Output:
<h1>Welcome to Markdown</h1>
<p>Markdown makes writing <strong>easy</strong>.</p>
<ul>
<li>No need to worry about formatting</li>
<li>Focus on content creation</li>
</ul>
4. Core Advantages of Markdown
(1) Concise and Readable
Markdown's symbols are intuitive — # suggests heading levels, * resembles bullet points, > looks like an indent for quotes. Even in a plain text editor, the document structure is clear at a glance:
# Level-1 heading
## Level-2 heading
### Level-3 heading
- Item 1
- Item 2
> This is a blockquote
(2) Portability and Conversion
Markdown files are plain text — no proprietary software required. They can be easily converted to multiple formats:
| Target Format | Tool | Use Case |
|---|---|---|
| HTML | Pandoc, marked.js | Web publishing |
| Pandoc, Typora | Print / distribution | |
| Word | Pandoc | Collaborative editing |
| EPUB | Pandoc | E-books |
| Slides | Marp, Slidev | Presentations |
▶ Example: Converting Markdown to HTML With Pandoc
pandoc document.md -o document.html
5. Use Cases for Markdown
(1) Technical Documentation and READMEs
Almost every project on GitHub has a README.md file. Markdown is the de facto standard for technical documentation:
# Project Name
> A brief description of your project
## Installation
\`\`\`bash
npm install my-project
\`\`\`
## Usage
\`\`\`javascript
const myProject = require('my-project');
myProject.start();
\`\`\`
## License
MIT
(2) Blogs and Notes
Modern static site generators (Jekyll, Hugo, Hexo) all use Markdown as their content format. Note-taking apps (Notion, Obsidian, Logseq) also natively support Markdown.
| Platform | Markdown Support | Highlight |
|---|---|---|
| GitHub | ⭐⭐⭐⭐⭐ | Full support for README / Issues / Wiki |
| Obsidian | ⭐⭐⭐⭐⭐ | Local-first, bidirectional links, graph view |
| Notion | ⭐⭐⭐⭐ | Block editor + Markdown import/export |
| Zhihu / Jianshu | ⭐⭐⭐ | Partial support, mainly for articles |
| Jekyll / Hugo | ⭐⭐⭐⭐⭐ | Static blogs, fully Markdown-based |
▶ Example: Bidirectional Links in Obsidian
# Study Notes
Today I studied [[CSS Flexbox]] and [[Grid Layout]].
Flexbox is great for [[one-dimensional layouts]], while Grid excels at [[two-dimensional layouts]].
Reference: [[Frontend Learning Path]]
[[wikilink]] syntax isn't standard Markdown, but it's a Markdown-based extension that turns your notes into a knowledge graph.
6. Full Example: Writing a Project Overview With Markdown
# Todo App
> A simple command-line todo application built with Python.
## Features
- Add, delete, and mark tasks as complete
- Save tasks to a JSON file
- Dark mode terminal UI
## Quick Start
\`\`\`bash
git clone https://github.com/alex/todo-app
cd todo-app
python main.py
\`\`\`
## Project Structure
\`\`\`text
todo-app/
├── main.py # Entry point
├── todo.py # Task management
├── storage.py # File I/O
└── requirements.txt # Dependencies
\`\`\`
## License
MIT License
Expected result: A well-structured GitHub README page with the project name, description, feature list, installation commands, and directory structure.
❓ FAQ
.md is the more common abbreviation; .markdown is the full spelling. Parsers treat both the same way.📖 Summary
- Markdown is a lightweight markup language that represents formatting with simple symbols
- Markdown is ultimately parsed into HTML — the two complement rather than compete with each other
- Four key advantages: concise and readable, portable and convertible, version control-friendly, content-first
- Use cases: GitHub READMEs, blogs, notes, technical documentation, and more
- The standard specification is CommonMark; GFM is the most popular extended subset
📝 Exercises
-
Beginner: Open any text editor, write a Markdown snippet containing an H1 heading, a paragraph, and an unordered list. Save it as a
.mdfile and open it in a browser, or preview it in VS Code to see the effect. -
Intermediate: Find an open-source project on GitHub, read its README.md source (click the Raw button), and list the Markdown syntaxes it uses (at least 5).
-
Challenge: Use Pandoc or an online tool (e.g., markdowntohtml.com) to convert your Markdown to HTML. Compare the source and rendered output to understand which HTML tag each Markdown piece maps to.