Markdown
Markdown เป็นภาษา markup น้ำหนักเบาที่ใช้ไวยากรณ์การจัดรูปแบบข้อความธรรมดาเพื่อสร้างเอกสารที่มีโครงสร้าง แปลงเป็น HTML ได้ และเป็นมาตรฐานสำหรับไฟล์ README เอกสารประกอบ บล็อก และแอปจดบันทึก Markdown ให้ความสำคัญกับความสามารถในการอ่านในรูปแบบต้นฉบับดิบ
ประเภท MIME
text/markdown
ประเภท
ข้อความ
การบีบอัด
ไม่สูญเสียคุณภาพ
ข้อดี
- + Extremely simple syntax that anyone can learn in minutes
- + Version-control friendly — clean diffs in Git
- + Renders beautifully on GitHub, GitLab, and most platforms
- + Converts easily to HTML, PDF, DOCX, and other formats
ข้อเสีย
- − Limited formatting — no native support for tables of contents or footnotes
- − Flavor fragmentation (CommonMark, GFM, MDX) creates inconsistencies
- − No built-in styling — appearance depends on the renderer
เมื่อใดควรใช้ .MD
ใช้ Markdown สำหรับเอกสารประกอบ ไฟล์ README บล็อกโพสต์ บันทึก และเนื้อหาใดก็ตามที่ได้ประโยชน์จากการควบคุมเวอร์ชันและการแก้ไขข้อความธรรมดา
รายละเอียดทางเทคนิค
ไฟล์ Markdown เป็นข้อความธรรมดาที่ใช้สัญลักษณ์ เช่น # สำหรับหัวเรื่อง * สำหรับการเน้นข้อความ และ [ ] สำหรับลิงก์ ตัวประมวลผล Markdown (เช่น marked, markdown-it) จะแยกวิเคราะห์ไวยากรณ์เป็น AST และเรนเดอร์เอาต์พุต HTML
ประวัติ
John Gruber สร้าง Markdown ในปี 2004 ร่วมกับ Aaron Swartz โดยมุ่งหวังให้เป็นรูปแบบที่อ่านได้เป็นข้อความธรรมดาและแปลงเป็น HTML ได้ง่าย CommonMark (2014) และ GitHub Flavored Markdown ได้กำหนดมาตรฐานไวยากรณ์
แปลงจาก .MD
แปลงเป็น .MD
รูปแบบที่เกี่ยวข้อง
คำศัพท์ที่เกี่ยวข้อง
Learn More
JSON vs YAML vs TOML: Choosing a Configuration Format
Configuration files are the backbone of modern applications. JSON, YAML, and TOML each offer different trade-offs between readability, complexity, and …
Text Encoding Explained: UTF-8, ASCII, and Beyond
Text encoding determines how characters are stored as bytes. Understanding UTF-8, ASCII, and other encodings prevents garbled text, mojibake, and …
How to Format and Validate JSON Data
Malformed JSON causes silent failures in APIs and configuration files. Learn how to format, validate, and debug JSON documents to …
Regular Expressions: A Practical Guide for Text Processing
Regular expressions are powerful patterns for searching, matching, and transforming text. This guide covers the most useful regex patterns with …
Base64 Encoding: How It Works and When to Use It
Base64 converts binary data into ASCII text, making it safe for transmission through text-based systems. Learn when Base64 is the …
Markdown vs Rich Text vs Plain Text: When to Use Each
Choosing between Markdown, rich text, and plain text affects portability, readability, and editing workflow. This comparison helps you select the …