GitHub README File Syntax and Templates
README files are written in Markdown, a simple markup language that’s easy to learn and can be used to format your text. If you’re new to GitHub, or just want a refresher on the basics of creating and editing a README file, you’ve come to the right place.
GitHub README File Syntax
In this post, we’ll cover everything from the syntax for writing in Markdown, to adding images and links. We’ll also show you how to create tables and code blocks, so you can present your information in an easy-to-understand way.
Text Styles
**Bold** or __Bold__
*Italic*
or _Italic_
~~Strikethrough~~
***Bold and italic***
**This bold paragraph contains an _italic_ text**
Bold
Italic
Strikethrough
Bold and italic
This bold paragraph contains an italic text
Heading
You can make a heading by adding one to six # symbols before your text. The number of # symbols is the size of the heading.
#Heading 1
##Heading 2
###Heading 3
####Heading 4
#####Heading 5
######Heading 6
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Quote
>A quote is a block of text that is set off from the main text by quotation marks.
A quote is a block of text that is set off from the main text by quotation marks.
Code Block
Replace a text with PHP ``` $text = str_replace('one', 'an', 'There is one apple.') print $text; ```
Replace a text with PHP
$text = str_replace('one', 'an', 'There is one apple.')
print $text;
List
– Apple
– Samsung
– OnePlus
– Xiaomi
* Kotlin
* Java
* Android
* XML
- Apple
- Samsung
- OnePlus
- Xiaomi
- Kotlin
- Java
- Android
- XML
Link & Image
![Tle Apps](https://tleapps.com)
![Image Alt Text](https://tleapps.com/wp-content/uploads/2021/12/covid_icon_001.png)
Task List
Add a hyphen and space followed by [ ] to a list's item to create a task
. If you want to mark the task as completed, use [x]
.
– [ ] Remove all log print lines
– [ ] Remove deprecated functions
– [x] Increase font size
Table
Displaying table in README.md requires a bit of formatting skill.
| Browser | Support |
|---------|---------|
| Chrome | yes |
| Firefox | yes |
| Edge | no |
Browser | Support |
---|---|
Chrome | yes |
Firefox | yes |
Edge | no |
README.md Templates
This template contains the most basic sections which an open-source program should have. You can use this to introduce your project in a simple and clear way.
Best-README-Template
There are a plethora of excellent README templates on GitHub, but it is hard to find one that suited everyone’s needs. This README template contains all sections you can think of.
Any developers can use this and customize it to their needs.