Git & GitHub · Your First Repository

Writing a README

The README is the front page of your repository. GitHub shows it under the file list, formatted from Markdown.

Beginner 5 min Lesson 6 of 19Shows Git 2.47 and GitHub.com as of 2026. GitHub changes its layout from time to time; button names stay the same.
0/19 in Git & GitHub
On this page · 5 min · Beginner

Learning objectives#

  • Know what belongs in a README
  • Write Markdown headings, lists, links and code blocks
  • Add a screenshot
  • Preview before committing

Explanation#

A useful README answers four questions: what is this, what does it look like, how do I run it, and what is it built with. A screenshot or GIF near the top helps more than a long paragraph.

Markdown is plain text with simple symbols: # for headings, - for list items, **bold**, [link text](https://…), ![alt text](images/screenshot.png) for images, and three backticks for a code block.

GitHub’s editor has Edit and Preview tabs. Check the preview before committing; a missing blank line before a list is the most common formatting problem.

Step-by-step screens#

Drawings of github.com, the Git installer, VS Code and a terminal. GitHub changes its layout from time to time; the button names stay the same. The red numbers match the numbered actions under each picture; names on your computer will differ.

Loading pictures…

Code example: README.md for a small website#

TextREADME.md Illustrative
# Hello GitHub


My first website, built while learning Git and GitHub.


![Home page](images/home.png)


## Features
- Responsive layout
- Contact form with validation


## Run it locally
```bash
git clone https://github.com/asha/hello-github.git
cd hello-github
npx serve .
```


## Built with
HTML, CSS and JavaScript · [Live demo](https://asha.github.io/hello-github/)
Expected output
GitHub renders a large heading, the screenshot, two bulleted features, a grey code block with a copy button, and a clickable Live demo link.

This example is illustrative. Copy or download it and run it in your own environment; the expected output is shown above.

Step-by-step explanation#

  1. # makes the title, ## the sections.
  2. ![…](…) shows the screenshot stored in the repo.
  3. - items become a bulleted list.
  4. Triple backticks create a code block with a copy button.
  5. [text](url) makes a link.

Real-world use case#

Recruiters spend about a minute on a project. A README with a screenshot, a live link and run steps gets the project looked at.

Common mistakes#

Default README with only the title

Visitors can’t tell what the project is. Add a sentence, a screenshot and run steps.

Images linked from your computer

C:\Users\… paths don’t exist on GitHub. Commit the image and use a relative path.

Best practices#

  • Screenshot near the top
  • Clear run steps
  • Link the live demo
  • Keep it up to date

Remember this#

README = front page.

# heading, - list, [text](link), ![alt](image).

Preview before commit.

Practice exercise#

Your task: Write the Markdown for a link with the text “Live demo” to https://asha.github.io.

Show solution
Text Illustrative
[Live demo](https://asha.github.io)

Mini quiz#

Writing a README quizMultiple choice Question 1 of 1

Which Markdown shows an image?

Score so far: 0/0

Want more? Practise all Git & GitHub MCQs · Git & GitHub interview questions

My notes#

Saved in this browser.

Progress is saved in this browser. Sign in to sync.