Forem

Cover image for Learn Markdown in less than 5 minutes.
Suraj
Suraj

Posted on

Learn Markdown in less than 5 minutes.

Short introduction of Markdown

Markdown is a lightweight markup language created by John Gruber and Aaron Swartz in 2004. It is widely used for blogging, instant messaging, online forums, collaborative software, documentation pages, and readme files. Markdown was inspired by pre-existing conventions for marking up plain text in email and Usenet posts, such as the earlier markup languages setext, Textile, and reStructuredText.

Learning Markdown is very essential in open source because you'll see README.md file on GitHub in every project, so you must have to learn it.

Image

In the above picture, you can see the README.md file which is here a profile's special readme file that everyone gets with the same username repository.

![Image(https://dev-to-uploads.s3.amazonaws.com/uploads/articles/djhc219badcn545oprx8.png)

Now in this picture, you can see all the headings, bold, italic, code, link, etc.. formats are given and after using these before posting you can see the preview.

Note: It is almost close to HTML but it is different from HTML because as I told you earlier it is a lightweight version of HTML.

Let's see all the syntax of Markdown:

  • Headings
# A first-level heading
## A second-level heading
### A third-level heading
Enter fullscreen mode Exit fullscreen mode
  • Bold and Italic
**Bold**
*italic*
Enter fullscreen mode Exit fullscreen mode
  • For highlight

    In this, the line will be highlighted

> This is a blockquote
Enter fullscreen mode Exit fullscreen mode
  • For ordered and unordered lists
for ordered list
1.
2.
for unordered list
-
-
Enter fullscreen mode Exit fullscreen mode
  • Code
`code`

Enter fullscreen mode Exit fullscreen mode


javascript
console.log

Enter fullscreen mode Exit fullscreen mode
  • For Links and Images
This is for the link

[Your Title](www.google.com)

This is for the images

![Your Title](./images/opensource.png)
Enter fullscreen mode Exit fullscreen mode
  • Checked and unchecked lists - GitHub's extra flavor
- [x] checked
- [ ] unchecked
Enter fullscreen mode Exit fullscreen mode
  • Adding emoji

    Try it on GitHub or if you want to use it in VS Code install the

:joy:
Enter fullscreen mode Exit fullscreen mode

Recommended πŸ˜…: Use emoji directly bro, don't need to write πŸ˜‚ and then get the emoji, today UTF 16 is supported everywhere.

  • Making tables
| Title | description |
| --- | --- |
| Open Source | Open Source etiquette |
Enter fullscreen mode Exit fullscreen mode
  • Draw a line
---
Enter fullscreen mode Exit fullscreen mode

Wrap Up:

image

Website to convert simple text to markdown format

Always create a README.md file (Benefits)

  • When you create a new repository GitHub gives an option to create a README.md file along with that readme file.
  • So README file like a cover of a book, means it shows or describes what is inside your repository.
  • It just takes 10 - 15 minutes to make your README.md file and it increases your profile value on GitHub if anyone visits your profile that person will be impressed by your work

Another Blog: Learn Git and GitHub

Top comments (2)

Collapse
 
konafatsea profile image
Kona Fatsea

I was lowkey wondering how to add emojis - turns out it's so simple 😳

Collapse
 
surajkumar00 profile image
Suraj

Yeah