Beginner Guide to Markdown Language

Adil Shehzad
2 min readFeb 18, 2020

--

About MarkDown Language

Markdown is a lightweight markup language that simplifies the workflow of web writers. It was created in 2004 by John Gruber with contributions and feedback from Aaron Swartz. Markdown was described by John Gruber as: “A text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).” Markdown is two different things:

  • Simple syntax to create documents in plain text
  • A software tool is written in Perl that converts the plain text formatting to HTML

Running the Markdown on Local Personal Computer

Downloading Perl

Downloading Perl according to your requirements

Downloading Markdown

Download Markdown from official website

Running Markdown

The Perl script is not too complicated to use. Again, in our command-line interface, we run Perl that takes two arguments: the path of the Markdown script that we just downloaded and the path of the Markdown file that we want convert.

perl Markdown.pl markdown-file.md

Markdown will process the Markdown file; the resulting output after running the script is the HTML code shown in the terminal. To save this output, we redirect the standard output to an HTML file:

perl Markdown.pl markdown-file.md > output-file.html

Creating your first Markdown document

Inserting Paragraph

A paragraph, divided into two lines.

The preceding code will produce: <p>A paragraph,
divided into two lines.</p>

A paragraph Another paragraph, separated by a new line.

The preceding code will produce: <p>A paragraph</p>
<p>Another paragraph, separated by a new line.</p>

A sentence, with a line break.

The preceding code will produce: <p>A sentence, <br /> with a line break</p>

Inserting Headers

`Header 1`
`========
` `Header 2`
` — — — — `

The preceding code will produce:
<h1>Header 1</h1>
<h2>Header 2</h2>

Atx style

# Header 1
## Header 2
### Header 3
#### Header 4
##### Header 5
###### Header 6
The preceding code will produce:
<h1>Header 1</h1>
<h2>Header 2</h2>
<h3>Header 3</h3>
<h4>Header 4</h4>
<h5>Header 5</h5>
<h6>Header 6</h6>

Wrapping Up

Markdown is a simple and beautiful language to create Github Pages and Documents. Following Cheat sheets are available for full Markdown Documentation

Cheat Sheet 1

Instant Markdown

Cheat Sheet 2

Markdown Here

--

--