DEV Community

Cover image for How to Write Markdown ?
Gaurav Maheshwari
Gaurav Maheshwari

Posted on

How to Write Markdown ?

What is Markdown ?

A scripting language that is very lightweight. Markdown is rapidly used in content writing in some blog post website like this one.

What is Readme.md file ? ( ___.md )

It is a simple plain text file that contain basic information of the files and guides. It's usually used to write basic documentation, most popularly repositories by repository providers like GitHub, GitLab and bitbucket.

Some of the Markdown Editor:
StackEdit
Markdown Editor
Markdown Live Preview

Let's now learn some commands of markdown.

To write normal text : simply write on .md file.

  • ## Heading : '#' is used for heading =>
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
Enter fullscreen mode Exit fullscreen mode

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6
  • Italics :

    _Italics_ =>
    Italics

  • Bold or Strong Text :

    **Bold/Strong** => Bold/Strong

  • Bold and Italics :

    ***Bold and Italics*** => Bold and Italics

  • Scratch any tet :

    ~~1000~~ => 1000

  • Links :

    [include title to show on file](include the link here) =>
    [Visit My Portfolio](https://gaurav24072002.github.io/) =>
    Visit My Portfolio

  • Images :

    ![Alternative text for image](include Image link) =>
    ![Markdown-mark](https://octodex.github.com/images/daftpunktocat-guy.gif) =>
    Markdown-mark

  • To make any text look like code :

` This is the code format of markdown file `
Enter fullscreen mode Exit fullscreen mode

=> This is the code format of markdown file

  • ## To get all the syntax of a particular programming language :
very name = "Gaurav";
console.log(name);
Enter fullscreen mode Exit fullscreen mode
  • Blockquotes :

    > Blockquotes =>

    Blockquotes

  • Horizontal Line :

    *** =>


    --- =>


___ =>


  • ## Tables : Tables are available in GitHub Flavored Markdown (GFM). To create a table, separate each column with the pipe symbol | and use three or more hyphens --- to indicate the first row (column headers).
| Tables | Goas | Here |
| --- | --- | --- |
| One | Two | Three |
| Four | Five | Six |
Enter fullscreen mode Exit fullscreen mode

Table

  • ## Lists : > Note : We have indentation in list
  • Nested List :
* Fruit
    - Second Level
        + Third Level
Enter fullscreen mode Exit fullscreen mode

=>

  • First Level
    • Second Level
      • Third Level
Ordered List => 
    1. List One
    2. List Two
    3. List Three
Unordered List => 
    - List Four
    - List Five
Enter fullscreen mode Exit fullscreen mode

Ordered List =>

  1. List One
  2. List Two
  3. List Three

Unordered List =>

  • List Four
  • List Five

Escaping Characters

In case you actually want to use certain literals like * and # without having them formatted, simply prefix a backslash \ before the character or wrap it inside a pair of backticks (similar to inline code).

\# Without the backslash, this would be a level 1 heading!
Enter fullscreen mode Exit fullscreen mode

Summary -

Now that you know how to use Markdown, it's your turn to play around with the syntax, build cool projects with it, and have fun along the way!

Top comments (0)