Markdown - an easy markup language
April 10, 2021
• 2 min read
What is markdown?
Markdown is a lightweight markup language for creating formatted text using a plain-text editor.
It's like HTML (HyperText Markup Language) with some sugar. Using markdown, you can control the view of your document by formatting it, like -
- Format text as heading, bold, italic, blockquotes, etc.
- Insert links, images, tables, lists, code blocks, etc.
The extension of a markdown file is .md or .markdown
Headings
To format text as a heading, you have to use the # symbol. There are six types of heading in markdown.
# This is heading one
## This is heading two
### This is heading three
#### This is heading four
##### This is heading five
###### This is heading six
The output of this -
Text formatting
Formatting text is effortless in markdown. There are multiple steps to format text.
**This is bold text**
**This is bold text**
_This is Italic Text_
_This is Italic Text_
_This is **bold** and italic combined_
> This is a blockquote
The output of this -
Working with lists
Unordered and Ordered lists both have support on markdown. A list can contain nested lists also.
Unordered List
- Item 1
- Item 2
- Item 2a
- Item 2b
Ordered List
1. Item 1
2. Item 2
3. Item 3
- Item 3a
- Item 3b
The output of this -
Link and Image
![GitHub Logo](https://images.unsplash.com/..)
[SadatJubayer](http://smjubayer.me)
The output of this -
Codeblocks
To write a code in markdown, you need three carets (```) in the starting and three carets (```) in the end. You can write the language specifier after the first carets to get syntax highlighting of that language.
```javascript
function sayHello() {
console.log('Hello from Sadat Jubayer!');
}
```
The output of this -
Resources
This article covers the basics of Markdown. I hope this will help you write markdown files quickly.