Skip to content

Wiki

Introduction

About 12 min read

1.Introduction

Markdown is a lightweight markup language that allows people to write documents in a plain-text format that is easy to read and write.

Markdown language was created in 2004 by John Gruber.

The design philosophy of Markdown is "easy to read, easy to write," enabling people to use a simple plain text format to write structured documents.

Documents written in Markdown can be exported to a variety of formats, including HTML, Word, images, PDF, and Epub.

Markdown-written documents have the extensions .md and .markdown.

2.Key Features

The core features of Markdown include:

Simplicity: Use intuitive symbols to represent formatting, such as # for headings and * for list items. These symbols visually convey their meaning and remain highly readable even without rendering.

Readability: Even a Markdown document in plain text form can clearly present the document's structure and hierarchy. Readers can understand how the content is organized without specialized software.

Portability: Markdown files are in plain text format, can be opened and edited in any text editor, and do not depend on specific software or operating systems.

Convertibility: It can be easily converted to multiple formats such as HTML, PDF, and Word documents, meeting different publishing needs.

3.The concept of lightweight markup languages

A markup language is a language that uses specific symbols to describe the structure and formatting of a document. Traditional markup languages such as HTML are powerful but have complex syntax, whereas lightweight markup languages simplify this process.

Compared with HTML, the advantages of Markdown are:

Low learning cost, basic syntax can be mastered in a few minutes High writing efficiency, no need to input complex tags Focus on content, not formatting details Version control friendly, facilitating collaboration and change tracking

4.Relationship between Markdown and HTML

Markdown is not a replacement for HTML, but rather a simplified version of HTML. In fact, the ultimate goal of Markdown is to be converted to HTML. The relationship between the two can be understood as follows:

Markdown 源码 → 解析器 → HTML 输出 → 浏览器渲染

For example, when you write:

# 这是一个标题

It will be converted to:

<h1>这是一个标题</h1>

Importantly, in Markdown you can use HTML tags directly, which provides flexibility for complex formatting. When Markdown's basic syntax cannot meet the requirements, you can embed HTML code to achieve specific effects.

5.Why Choose Markdown

Improve writing efficiency: There is no need to frequently use the mouse for formatting, allowing you to maintain continuity of thought. Writers can focus on content creation without being distracted by formatting issues.

Lower the learning barrier: compared with markup languages such as LaTeX and HTML, Markdown syntax is extremely simple, and most people can master its basic usage within an hour.

Broad compatibility: Almost all modern text editors, code editors, and note-taking applications support Markdown. From simple notepads to professional IDEs, you can find Markdown everywhere.

Version-control friendly: Because it is a plain text format, Markdown files work well with version control systems such as Git, making it easy to track document revision history and team collaboration.

Future adaptability: Even if a specific software or platform disappears, Markdown files, as plain text, can still be accessed and edited, ensuring the long-term availability of the content.

6.Application scenarios of Markdown

Technical documentation writing In software development, Markdown has become the standard format for technical documentation. It is particularly suitable for:

API documentation: Clear heading hierarchy and code block presentation make API descriptions both professional and easy to read. Many API documentation generation tools (such as Swagger) support Markdown-formatted descriptions.

Project description: From installation guides to user manuals, Markdown can effectively organize technical information. Code examples, configuration files, and command-line operations can all be properly presented.

Development specifications: A team's coding standards, design guidelines, workflows, and so on can all be written in Markdown, making it easy for team members to consult and update them.

Blog post creation Most modern blogging platforms and static site generators support Markdown:

Content management: bloggers can focus on content creation without worrying about complex HTML coding. Article formatting is accomplished through simple markup.

Platform portability: Articles written in Markdown can be easily migrated between different platforms and will not be locked in by platform-specific formats.

Offline writing: Articles can be written offline in any text editor and then published in batches, improving writing flexibility.

GitHub README file GitHub Markdown is widely used on platforms, especially for project README files:

Project Introduction: Clearly present key information such as the project's purpose, features, and usage.

Installation Guide: Provide detailed installation and configuration steps through code blocks and lists.

Contribution Guidelines: explains how to participate in project development, including code standards, submission process, etc.

Issue tracking: In Issues and Pull Requests, developers use Markdown to describe problems and provide solutions.

Note-taking and knowledge management Markdown is becoming the preferred format for digital notes:

Study notes: Supports multiple content types such as mathematical formulas, code highlighting, and diagrams, suitable for technical learning and knowledge organization.

Meeting notes: A clear title structure and list format make the key meeting points clear at a glance.

Knowledge base construction: Both enterprises and individuals are using Markdown to build knowledge bases, organizing information through links and tags.

Online writing platforms More and more writing platforms are beginning to support Markdown:

GitHub, Jianshu, Zhihu: The editors on these platforms support Markdown syntax, allowing creators to quickly format their articles.

GitBook, Notion: professional documentation and note-taking platforms with native Markdown support, offering powerful organization and collaboration features.

Static blog generators: tools such as Nuxt Content, Jekyll, Hugo, Hexo, etc. enable users to create professional websites using Markdown.