The readme file is important when you create a project and want to write about it in short documentation form. In this post, we are going to see how we can write the readme file.
Create a heading in the Readme file
To use a heading use hash before the heading text. In HTML we have 6 heading tags h1 to h6. Similarly in readme headings are represented by # symbol. Single # stands for big heading or h1 heading and it goes till six times # that is small heading or h6 heading.
# h1
## h2
### h3
#### h4
##### h5
###### h6
Write a word or sentence in italics in the Readme file
To write a word or sentence in italics use * or _ before and after the word/ sentence
Write a word or sentence in bold in the Readme file
To write a word or sentence in bold use * or _ two times before and after the word/ sentence
Strikethrough a word or sentence in the Readme file
To strikethrough a word or sentence in bold use ~ two times before and after the word/ sentence
How to Create an Ordered List in the Readme file
To create an ordered list just add numbers before the word or sentence
- Word
- another word
How to Create an Unordered List in Readme file
To create an Unordered list just add the + or – or * symbol before the word or sentence
How to Add Link in Readme file
To add a link into the readme file use square brackets for the link text and round brackets for the URL.
Syntax : [link text](URL)
How to Alt text to image in Readme file
To add a link to the readme file use an exclamation mark(!) followed by square brackets for the link text and round brackets for the image URL.
Syntax:![link text](image URL)
How to write code snippets in a Readme file
To write code snippets in a readme file use the tilt(`) symbol three times before and after the code snippet
Syntax:
```your code snippet ```