Markdown is a lightweight markup language designed to format plain text in a way that is easy to read and write. Created in 2004 by John Gruber in collaboration with Aaron Swartz, Markdown offers a simpler alternative to HTML for formatting text. Its simplicity and ease of use have made it popular for a wide range of applications, from writing README files and technical documentation to authoring blog posts and content management systems.
Here are some of the key features and common elements you might encounter in Markdown:
1. Headers: Defined using hash symbols (#). The number of hashes indicates the level of the header, from # for an <h1> to ###### for an <h6>.
# Header 1
## Header 2
### Header 3
2. Paragraphs: Simply separated by one or more blank lines.
This is a paragraph.
This is another paragraph.
3. Emphasis: Use asterisks (*) or underscores (_) for emphasis.
*italic* or _italic_
**bold** or __bold__
4. Lists: Use asterisks, plus, or hyphens for unordered lists; numbers for ordered lists.
- Item 1
- Item 2
- Sub-item 1
5. Links: Inline links are defined with square brackets for the linked text and regular parentheses for the URL.
6. Images: Similar to links but prefixed with an exclamation mark.
7. Code: Inline code is wrapped in backticks (`). Code blocks are either indented with four spaces or fenced by three backticks.
9. Blockquotes: Use the > symbol before the text.
> This is a quote.
9 Horizontal Rules: Use three or more hyphens, asterisks, or underscores.
There are multiple "flavors" or variations of Markdown that add additional features like tables, footnotes, and task lists. Examples include GitHub-Flavored Markdown (GFM), CommonMark, and MultiMarkdown, among others.
Content writing & blogging Forum and discussion board posts
Portable across different applications and platforms Extensible and customizable with various flavors and extensions
Markdown files usually have the .md or .markdown extension and can be converted to various formats (HTML, PDF, Word, etc.) using specialized software like Pandoc or integrated development environments (IDEs) that support Markdown rendering.