Writing readme.md (markdown file) file.

Bharat Kumar
4 min readMay 16, 2020

In this article you will going to learn what is markdown file, how to write it and why you should have it in your all projects. Most of the times you have seen at remote repository.

What is readme.md file?

A README is a text file that introduces and explains a project. It contains information that is commonly required to understand what the project is about. While READMEs can be written in any text file format, the most common one that is used nowadays is Markdown.

Why should I make it?

It’s an easy way to answer questions that your audience will likely have regarding how to install and use your project and also how to collaborate with you. You can add all features which you going to have this project.

What is markdown?

Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents. Created by John Gruber in 2004, Markdown is now one of the world’s most popular markup languages. So your written markdown file will be rendered as html by using MarkDown app, have a look below.

If you are beginner at writing markdown then this article for you. I’m going write readme.md files so that you will have a better understanding of the markdown scripting.

You can use any text editor. There are plugins for many editors (e.g. Atom, Emacs, Sublime Text, Vim, and Visual Studio Code) that allow you to preview Markdown while you are editing it. You can also use a dedicated Markdown editor like Typora or an online one like StackEdit or Dillinger. You can even use the editable template below.

Here i’m going to use visual studio code IDE for writing markdown file.

How to create readme.md file, have a look below.

Step-1 > Open visual studio code and goto - file > new file

Step-2: Name the file as readme.md or readme.markdown and save the file.

Step-3: Find and click the ‘open preview to the side’ icon.

Step-4: Start writing the script.

Headings

For writing headings you have to add hash # symbol at the beginning of the line. The number of # symbol will increase heading type. You can have a look above image. There are 6 types of heading available.

Normal Text

For normal (plain) text you can write as it is, you don’t need any tags or symbol.

Hyperlinks

For hyperlink you need to follow this pattern in markdown file : - [name](url)

e.g. [Github](https://www.github.com)

You can also add link hint or title in hyperlink so anyone can see it by just hovering over text. [name](url "Title") Make sure you add single space only in between url and title.

e.g. [Github](https://www.github.com "Github home")

Strong , italic and Strike through text

Italic text : by appending “_” before and ending at the sentence.

Strong text : by appending “**” before and ending at the sentence.

Strong and italic text : by appending “_**” before and ending at the sentence.

Strike through text : by appending “~~” before and ending at the sentence.

Images

For adding image you need to follow the tag : ![imageName](imageUrl)

Tables

You can write table by following this pattern :

Code Block

For writing code block you need to add “```" in beginning and ending of your code.

List

Adding list in markdown file have a look below.

Horizontal line

For horizontal line you have to add these tags : “_ _ _” or “* * *”

--

--