Getting Started With Writing And Formatting On GitHub
Last Updated :
24 Jul, 2025
GitHub is a widely-used platform for version control and collaborative development, but it’s also an excellent platform for documentation, writing, and formatting content using Markdown. Whether you're writing README files, documentation for your projects, or contributions to a wiki, understanding how to format text on GitHub will improve the readability and professionalism of your work.
This article will guide you through the essentials of writing and formatting on GitHub using Markdown, along with some useful tips and tools to enhance your writing.
What is Markdown?
Markdown is a lightweight markup language that allows you to format text in a simple and easy-to-read manner. It is used extensively on GitHub for writing README files, issues, pull request descriptions and more. Markdown syntax is intuitive and designed to be readable even in its raw form, making it ideal for collaborative writing and documentation.
Markdown files typically use the .md file extension.
Basic Formatting in Markdown
Here are some common Markdown formatting techniques that you can use in your GitHub repositories:
Headings
Headings are created using the # symbol followed by a space. The number of # symbols denotes the heading level (from h1 to h6).
# Heading 1
## Heading 2
### Heading 3
Output:
HeadingsEmphasis
You can italicize or bold text using * or _ for italics and ** or __ for bold.
*italic* or _italic_
**bold** or __bold__
Output:
EmphasisLists
You can create ordered and unordered lists easily in Markdown:
- Unordered List: Use *, -, or +.
- Ordered List: Use numbers followed by a period.
* Item 1
- Item 2
+ Item 3
1. First item
2. Second item
Output:
ListsLinks and Images
To insert a link, use the following syntax:
[GitHub](https://github.com/)
To insert an image, use the same syntax but prepend an exclamation mark (!):

Code and Syntax Highlighting
Markdown on GitHub supports inline code and code blocks. Syntax highlighting is available for most programming languages.
Inline code: Use backticks to format inline code.
Here is some `inline code`.
Code block: For a block of code, use triple backticks (```) with the language specified.
```javascript
const hello = 'Hello, world!';
console.log(hello);
Output:
const hello = 'Hello, world!';
console.log(hello);
This formatting helps make your code readable and understandable, especially when collaborating with others.
Blockquotes and Horizontal Lines
You can create blockquotes using the > symbol. Blockquotes are useful for quoting text or emphasizing important sections.
> This is a blockquote.
Output:
BlockquotesTo create horizontal lines, you can use three or more hyphens (---), asterisks (***), or underscores (___).
---
Tables
Tables in Markdown are easy to create. Use pipes (|) to separate columns and hyphens (-) to define headers.
| Header 1 | Header 2 |
| -------- | -------- |
| Cell 1 | Cell 2 |
| Cell 3 | Cell 4 |
Output:
TablesTables are useful for presenting data in an organized way, especially for documentation.
Task Lists
Task lists allow you to create checklists in issues, pull requests, and comments.
- [x] Task 1
- [ ] Task 2
Output:
Task ListsTask lists are perfect for tracking progress on issues or tasks in a project.
GitHub Flavored Markdown (GFM)
GitHub Flavored Markdown extends standard Markdown syntax by adding support for additional formatting options, including:
- Task Lists (as shown above)
- Mentions: You can tag collaborators by using @ followed by their username (e.g., @octocat).
- Strikethroughs: Use ~~ to strike through text.
~~This is strikethrough text.~~
Output:
strikethrough textWorking with README Files
README files are one of the most important aspects of a GitHub repository. They give an overview of the project and typically include installation instructions, usage examples, and contact details.
Here’s a basic example of a README file:
Readme fileWriting Wiki Pages
GitHub wikis use the same Markdown syntax and are ideal for organizing documentation for larger projects. Each page in the wiki can be dedicated to a specific topic, and you can interlink pages to create comprehensive documentation.
Conclusion
Writing and formatting on GitHub using Markdown is a simple yet powerful way to create clear and professional documentation for your projects. Whether you’re writing a README, issues, or documentation pages, understanding the basics of Markdown will enhance your ability to communicate effectively.
By using the tools and tips in this guide, you can:
- Create well-structured documentation.
- Improve collaboration through clear issues and pull requests.
- Maintain a polished and professional project presence on GitHub.
Mastering Markdown on GitHub is essential for any developer looking to contribute to or maintain open-source projects.
Explore
Git Introduction
Git Installation and Setup
All Git Commands
Most Used Git Commands
Git Branch
Git Merge
Git Tools and Integration
Git Remote Repositories
Collaborating with Git
Advanced Git Commands