- Published on
Comprehensive Markdown Learning Guide
- Authors
- Name
- Pascal BEGARIN
Introduction
Markdown is a lightweight markup language that allows you to style text on the web. It is widely used for writing documents, blogs, and technical documentation. This guide will help you understand the basics of Markdown, integrate images, create lists, and explore the differences between standard Markdown and GitHub Flavored Markdown (GFM).
What is Markdown?
Markdown allows you to format text using special characters. It is designed to be simple and readable, even as plain text. This guide covers the main Markdown syntaxes and provides practical examples.
Markdown Syntax Guide
Here are the main Markdown syntaxes that you can use.
Headers
To create headers, use the #
symbol. The more #
symbols you use, the smaller the header.
# This is a level 1 header (H1)
## This is a level 2 header (H2)
### This is a level 3 header (H3)
This is a level 1 header (H1)
This is a level 2 header (H2)
This is a level 3 header (H4)
Text Formatting
Italics and Bold
Use asterisks or underscores to format text.
*Italic text* or _Italic text_
**Bold text** or __Bold text__
Italic text or Italic text
Bold text or Bold text
Lists
Unordered Lists
To create unordered lists, use hyphens -
, plus +
, or asterisks *
.
- Item 1
- Item 2
- Subitem 2.1
- Item 1
- Item 2
- Subitem 2.1
Ordered Lists
For ordered lists, use numbers followed by a period.
1. First item
2. Second item
- First item
- Second item
Images
To insert an image, use the following syntax:
![Markdown Logo](https://markdown-here.com/img/icon256.png)
You can also reference a local image using a relative path:
Links
To create a link, use the following syntax:
[Markdown Here](https://markdown-here.com)
Blockquotes
To add a quote, start the line with a >
.
> This is a blockquote.
This is a blockquote.
Code
Inline Code
To include inline code, wrap it with backticks `
.
Use code
here.
Code Blocks
For code blocks, use three backticks.
```js:helloConsole.js
function test() {
console.log("Hello, World!");
}
```
And here is what it looks like: nicely colored with stylized code titles!
function test() {
console.log("Hello, World!");
}
Tables
To create a table, use vertical bars |
and dashes -
to separate headers from columns.
| Header 1 | Header 2 |
| -------- | -------- |
| Row 1 | Row 2 |
Header 1 | Header 2 |
---|---|
Row 1 | Row 2 |
Differences between Standard Markdown and GitHub Flavored Markdown
GitHub Flavored Markdown (GFM) is an extension of standard Markdown that adds extra features, including:
- Task Lists: Allows adding checkboxes.
- [x] Completed task
- [ ] Task to do
Completed task
Task to do
Enhanced Code Syntax: GFM supports syntax highlighting for code blocks by specifying the language.
```python
def hello():
print("Hello, World!")
```
def hello():
print("Hello, World!")
User Mentions: You can mention users by using
@username
.Emoji Support: You can insert emojis using the
:emoji_name:
syntax.
Conclusion
Markdown is a powerful tool for writing documents and creating content on the web. With this guide, you now have the basics to start using Markdown effectively, as well as an understanding of the differences between standard Markdown and GitHub Flavored Markdown. Feel free to experiment with the syntax to discover all the possibilities it offers.