close
close
github markdown cheat sheet

github markdown cheat sheet

2 min read 13-10-2024
github markdown cheat sheet

GitHub Markdown Cheat Sheet: Mastering the Basics for Effective Communication

GitHub Markdown is a powerful tool for creating clear and concise documentation, README files, issue descriptions, and more. It's a simple yet versatile markup language that allows you to format text, add images and links, and create lists and code blocks – all within the familiar confines of your GitHub repository.

This comprehensive cheat sheet, compiled from insightful contributions by the GitHub community (https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet), will equip you with the essential Markdown skills to communicate effectively within the GitHub ecosystem.

1. Headings

  • # Heading 1: The largest heading size.
  • ## Heading 2: Smaller heading size, used for section titles.
  • ### Heading 3: Even smaller heading size, for sub-sections.
  • ... and so on...

Example:

# This is a heading 1
## This is a heading 2
### This is a heading 3

2. Emphasis

  • Bold text: Use **bold text** or __bold text__.
  • Italic text: Use *italic text* or _italic text_.
  • Combined emphasis: You can use both bold and italic by combining the symbols. For example, ***bold and italic text***.

Example:

**This is bold text.**

*This is italic text.*

***This is both bold and italic text.*** 

3. Lists

  • Unordered lists: Use - or * to create unordered lists.
  • Ordered lists: Use numbers followed by a period (.) to create ordered lists.

Example:

- Item 1
- Item 2
- Item 3

1. First item
2. Second item
3. Third item

4. Links

  • Text links: Use [link text](link URL).

Example:

This is a link to [GitHub](https://github.com).

5. Images

  • Image insertion: Use ![alt text](image URL).

Example:

![GitHub logo](https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png)

6. Code Blocks

  • Inline code: Use backticks ( ) to highlight code snippets within a line of text.
  • Code blocks: Use three backticks (```) to create multi-line code blocks. You can also specify the programming language for syntax highlighting.

Example:

This is a line of text with `inline code`.

```python
def my_function():
  print("This is a code block!")

7. Horizontal Rules

  • Use three hyphens (---) to create a horizontal rule.

Example:

---

Beyond the Basics:

This cheat sheet covers the fundamental Markdown features. For more advanced usage, explore additional options such as:

  • Tables: Create formatted tables using Markdown syntax.
  • Footnotes: Add footnotes to provide additional context or references.
  • Task Lists: Create to-do lists with checkboxes.

Remember:

Mastering GitHub Markdown empowers you to create informative and engaging content within the GitHub ecosystem. Start with the basics, experiment with features, and leverage this powerful tool to enhance your communication and collaboration.

Related Posts


Popular Posts