Introduction
Markdown is a lightweight markup language created by John Gruber in 2004. It is based on the formatting conventions used in email and usenet messages. In this blog post, we will explore the basics of Markdown, along with some examples of how it is used.
Basics of markdown
Markdown is a text-to-HTML conversion tool for web writers. It allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid HTML. Markdown is written by using symbols or punctuation characters to indicate formatting.
Let’s have a look at the syntax to get a better understanding.
Basic Syntax
The basic syntax for Markdown is as follows.
Headings
# Heading 1
## Heading 2
### Heading 3
Emphasis
*Italics*
**Bold**
~~Strikethrough~~
Lists
- Unordered list
1. Ordered list
Links
[Link Text](<https://davegulati.com>)
Images
![alt text](image.jpg)
Code
`code`
Extended Syntax
There is also the extended syntax which offers more formatting and functionality but comes at the cost of not being supported by all markdown applications.
Tables
| First Name | Last Name | | ----------- | ----------- | | Dave | Gulati | | Gave | Dulati |
Fenced Code Block
{ "firstName": "Dave", "lastName": "Gulati", "website": "<https://davegulati.com/>" }
Footnote
Here's a sentence with a footnote. [^1] [^1]: This is the footnote.
Heading ID
My Great Heading {#custom-id}
Definition List
term : definition
Task List
- [x] Write the press release - [ ] Update the website - [ ] Contact the media
Emoji
Markdown is pretty cool, ay? :joy:
Highlight
I need to highlight these ==very important words==.
Superscript
X^2^
Subscript
H~2~O
Conclusion
Markdown is a powerful and flexible tool for writing for the web. It simplifies the process of creating structured and valid HTML, as well as making it easier to read and write. Markdown is now used widely across the web, from blogs to wikis and many other applications.