How to Use The Markdown Cheat Sheet GitHub, Simple Guides!

If you’re anything into technical writing, you’re always on the lookout for new ways to optimize your workflow. One of many favorite tools is GitHub Markdown. It’s a simple way to format your text without having to use HTML tags, and it’s supported by most text editors.

But if you’re new to Markdown, it can be a little confusing. That’s why you will need this cheat sheet. It includes all of the basic elements you need to get started with Markdown, and it’s easy to reference when you need a refresher.

So without further ado, let’s get started!

Table of Content

Things You Should Know About GitHub Markdown Cheatsheet

  • You want a quick reference.
  • You want a showcase that could be used in future use.

List of Markdown Cheat Sheet GitHub

The list of markdowns on GitHub can be used to do various works on your project. Here is the list for you!

1. Table of Contents

You can download it from this post. I’ve included a table of contents below so you can easily navigate through this post.

  • Headings
  • Text styles
  • Syntax Highlighting
  • Alignments
  • Tables
  • Links
  • Images
  • Lists
  • Horizontal Rule
  • Diagrams
  • Mathematical expressions
  • Miscellaneous
  • Bitbucket
  • Tools

2. Headings

There are several methods for creating headings. To create the desired headings, we can use Markdown, HTML, or another syntax.

First, let’s go over the markdown syntax.

# Heading 1

## Heading 2

### Heading 3

#### Heading 4

##### Heading 5

The second option is to use the HTML syntax.

<h1>Heading 1</h1>

<h2>Heading 2</h2>

<h3>Heading 3</h3>

<h4>Heading 4</h4>

<h5>Heading 5</h5>

 

Finally, we can employ a different syntax. This method is only applicable to headings 1 and 2. For heading 1 or heading 2, add any number of = or – below the text.

Heading 1

=

Heading 2

 

Let’s take a look at it on GitHub now.

3. Text Styles

We can change the styles of texts using markdown syntaxes, such as bold, italic, blockquotes, monospaced, underlined, strike-through, boxed, subscript, and superscript.

To make the text bold, we can use two asterisks (**), underscores ( ), or the HTML tag strong>. We can make the text italic by using one asterisk (*), underscore ( ), or the HTML tag em>. We can also make the text both bold and italic at the same time.

Bold

**The quick brown fox jumps over the lazy dog.**

__The quick brown fox jumps over the lazy dog.__

<strong>The quick brown fox jumps over the lazy dog.</strong>

Italic

*The quick brown fox jumps over the lazy dog.*

_The quick brown fox jumps over the lazy dog._

<em>The quick brown fox jumps over the lazy dog.</em>

Bold and Italic

**_The quick brown fox jumps over the lazy dog._**

<strong><em>The quick brown fox jumps over the lazy dog.</em></strong>

Let’s take a look at it on GitHub now.

We can use the greater than sign > to create a blockquote. We can make a single or multiple-line blockquote. Also, use a blockquote within a blockquote. Other text styles, such as bold or italic, can be used inside a blockquote.

Blockquotes

> The quick brown fox jumps over the lazy dog.

> The quick brown fox jumps over the lazy dog.

> The quick brown fox jumps over the lazy dog.

> The quick brown fox jumps over the lazy dog.

> The quick brown fox jumps over the lazy dog.

>> The quick brown fox jumps over the lazy dog.

>>> The quick brown fox jumps over the lazy dog.

> **The quick brown fox** *jumps over the lazy dog.*

 

Let’s take a look at it on GitHub now.

You can achieve monospaced and underlined styles using the HTML tags samp> and ins>. You can use two Tilda signs to create a strike-through style.

Monospaced

<samp>The quick brown fox jumps over the lazy dog.</samp>

Underlined

<ins>The quick brown fox jumps over the lazy dog.</ins>

Strike-through

~~The quick brown fox jumps over the lazy dog.~~

Let’s take a look at it on GitHub now.

To make a box, we can use the HTML table> tag.

Boxed

<table><tr><td>The quick brown fox jumps over the lazy dog.</td></tr></table>

Let’s take a look at it on GitHub now.

Using the HTML tags sub> and sup>, we can achieve subscript and superscript styles. It comes in handy when writing a mathematical formula.

2 <sup>53-1</sup> and -2 <sup>53-1</sup>

Let’s take a look at it on GitHub now.

Subscript <sub>The quick brown fox jumps over the lazy dog.</sub>

Superscript <sup>The quick brown fox jumps over the lazy dog.</sup>

Let’s take a look at it on GitHub now.

4. Syntax Highlighting

To create the following view, we can use a single backtick ‘ before and after the code block.

A class method is an instance method of the class object. When a new class is created, an object of type `Class` is initialized and assigned to a global constant (Mobile in this case).

The word Class is highlighted, as you can see.

You can also create the following view by using triple backticks “‘ before and after the code block.

“`

public static String monthNames[] = {“January”, “February”, “March”, “April”, “May”, “June”, “July”, “August”, “September”, “October”, “November”, “December”};

“`

To enable syntax highlighting, we can add an optional language identifier. All valid keywords can be found in this and this GitHub document.

“`java

public static String monthNames[] = {“January”, “February”, “March”, “April”, “May”, “June”, “July”, “August”, “September”, “October”, “November”, “December”};

“`

 

Let’s take a look at it on GitHub now.

5. Alignments

We can align README contents by using HTML tags.

<p align=”left”>

<img src=”https://images.unsplash.com/photo-1415604934674-561df9abf539?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2772&q=80&#8243; width=”100″ height=”100″ border=”10″/>

</p>

 

<p align=”center”>

<img src=”https://images.unsplash.com/photo-1415604934674-561df9abf539?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2772&q=80&#8243; width=”100″ height=”100″ border=”10″/>

</p>

 

<p align=”right”>

<img src=”https://images.unsplash.com/photo-1415604934674-561df9abf539?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2772&q=80&#8243; width=”100″ height=”100″ border=”10″/>

</p>

Let’s now align some text.

<h3 align=”center”> My latest Medium posts </h3>

 

6. Tables

Let’s make a table without any headers.

<table>

<tr>

<td width=”33%”>

The quick brown fox jumps over the lazy dog.

</td>

<td width=”33%”>

The quick brown fox jumps over the lazy dog.

</td>

<td width=”33%”>

The quick brown fox jumps over the lazy dog.

</td>

</tr>

</table>

To make a header table, use dashes to separate each header cell and pipes to separate columns. The outer pipes are not required. To improve readability, we can use as many dashes and spaces as we want.

Columns can be aligned using colons. Use a colon to the left of dashes to left-align text. Use a colon on both sides of the dashes to center-align text. Use a colon to the right of dashes to right-align text. Left align is the default setting.

| Default | Left align | Center align | Right align |

| – | :- | :-: | -: |

| 9999999999 | 9999999999 | 9999999999 | 9999999999 |

| 999999999 | 999999999 | 999999999 | 999999999 |

| 99999999 | 99999999 | 99999999 | 99999999 |

| 9999999 | 9999999 | 9999999 | 9999999 |

| Default    | Left align | Center align | Right align |

| ———- | :——— | :———-: | ———-: |

| 9999999999 | 9999999999 | 9999999999   | 9999999999  |

| 999999999  | 999999999  | 999999999    | 999999999   |

| 99999999   | 99999999   | 99999999     | 99999999    |

| 9999999    | 9999999    | 9999999      | 9999999     |

Default    | Left align | Center align | Right align

———- | :——— | :———-: | ———-:

9999999999 | 9999999999 | 9999999999   | 9999999999 

999999999  | 999999999  | 999999999    | 999999999  

99999999   | 99999999   | 99999999     | 99999999   

9999999    | 9999999    | 9999999      | 9999999

Display two tables side by side now.

<table>

<tr>

<th>Heading 1</th>

<th>Heading 2</th>

</tr>

<tr>

<td>

| A | B | C |

|–|–|–|

| 1 | 2 | 3 |

</td><td>

| A | B | C |

|–|–|–|

| 1 | 2 | 3 |

</td></tr> </table>

Another example of two tables next to each other.

<table>

<tr>

<th>Before Hoisting</th>

<th>After Hoisting</th>

</tr>

<tr>

<td>

<pre lang=”js”>

console.log(fullName); // undefined

fullName = “Dariana Trahan”;

console.log(fullName); // Dariana Trahan

var fullName;

</pre>

</td>

<td>

<pre lang=”js”>

var fullName;

console.log(fullName); // undefined

fullName = “Dariana Trahan”;

console.log(fullName); // Dariana Trahan

</pre>

</td>

</tr>

</table>

7. Links

We can establish a link in four ways. The first is to use an inline style. The second employs the reference style, the third employs relative links, and the final employs auto links.

[The-Ultimate-Markdown-Cheat-Sheet (https://github.com/lifeparticle/Markdown-Cheatsheet)

If you use the same link repeatedly, using the reference style is advantageous because you don’t have to write the link every time, and it’s also simple to update the link. You can also use numbers in the reference text. You can also use the reference text as the link text.

[The-Ultimate-Markdown-Cheat-Sheet][reference text]

[The-Ultimate-Markdown-Cheat-Sheet][1]

[Markdown-Cheat-Sheet]

[reference text]: https://github.com/lifeparticle/Markdown-Cheatsheet

[1]: https://github.com/lifeparticle/Markdown-Cheatsheet

[Markdown-Cheat-Sheet]: https://github.com/lifeparticle/Markdown-Cheatsheet

We can also make relative links using any of the relative link operands, such as./ and../.

[Example of a relative link](rl.md)

GitHub can generate links from standard URLs automatically.

Visit https://github.com/

8. Images

We can add images using the same methods we used to add links.

![alt text](https://images.unsplash.com/photo-1415604934674-561df9abf539?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=100&q=80)

 

![alt text][image]

[image]: https://images.unsplash.com/photo-1415604934674-561df9abf539?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=100&q=80

We can also include an image by using the HTML img tag.

image src= “https://images.unsplash.com/photo-1415604934674-561df9abf539?ixlib=rb-1.2.1 &ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2772&q=80″ width=”100″ height=”100″ &ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=cro” border=”10″/>

We can also include GIF and SVG files.

<img src=”https://media.giphy.com/media/qLHzYjlA2FW8g/giphy.gif&#8221; />

9. Lists

We have ordered and unordered lists for lists.

1. One

2. Two

3. Three

Let’s make an ordered list with sub-items now.

1. First level

    1. Second level

        – Third level

            – Fourth level

2. First level

    1. Second level

3. First level

    1. Second level

We can use an asterisk, plus, or minus sign to make an unordered list.

* 1

* 2

* 3

+ 1

+ 2

+ 3

– 1

– 2

– 3

Let’s make an unordered list with sub-items now.

– First level

    – Second level

        – Third level

            – Fourth level

– First level

    – Second level

– First level

    – Second level

We can also make a list using HTML.

<ul>

<li>First item</li>

<li>Second item</li>

<li>Third item</li>

<li>Fourth item</li>

</ul>

Let’s make a task list now. To make a task list, use a hyphen followed by [ ], and to complete a task, place an x inside the brackets.

– [x] Fix Bug 223

– [ ] Add Feature 33

– [ ] Add unit tests

10. Horizontal Rule

To make a horizontal line, we can use three hyphens, asterisks, or underscores.

***

___

11. Diagrams

Mermaid now allows you to include diagrams. Flowcharts, Sequence diagrams, Gantt charts, Class diagrams, State diagrams, Pie charts, User Journey diagrams, and other diagrams are supported. Here’s an illustration of a pie chart. More information is available on GitHub.

“`mermaid

pie

“Movies” : 80

“TV shows” : 20

“`

12. Mathematical expressions

Mathjax now allows you to include diagrams. More information is available on GitHub. We can use the $ symbol to show inline math expressions and the $$ symbol to show math expressions as a block. An example of an inline math expression is as follows:

This is an inline math expression $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$

Here’s an example of a math expression written as a block:

$$

x = {-b \pm \sqrt{b^2-4ac} \over 2a}

$$

13. Miscellaneous

We can include comments within.md files.

<!–

Lorem ipsum dolor sit amet

–>

To escape literal characters, we can use a backslash. Before fleeing.

*   Asterisk

\   Backslash

`   Backtick

{}  Curly braces

.   Dot

!   Exclamation mark

#   Hash symbol

–   Hyphen symbol

()  Parentheses

+   Plus symbol

[]  Square brackets

_   Underscore

After escaping.

\*   Asterisk

\\   Backslash

\`   Backtick

\{}  Curly braces

\.   Dot

\!   Exclamation mark

\#   Hash symbol

\-   Hyphen symbol

\()  Parentheses

\+   Plus symbol

\[]  Square brackets

\_   Underscore

Emojis can also be included in our.md file.

:octocat:

We can mention someone or a team by typing @ followed by their username or team name.

@lifeparticle

By typing #, we can also get a list of suggested issues and pull requests from the repository.

#

14. Bitbucket

Markdown was supported by Bitbucket for READMEs. Make a table of contents as well.

Tools

There are several Markdown tools available to help you create a beautiful GitHub README faster.

  1. Create a Markdown table of content — GitHub
  2. Create an empty Markdown table — Tablesgenerator
  3. Convert Excel to Markdown table — Tableconvert
  4. Markdown preview for Sublime Text 3 — Packagecontrol
  5. Markdown preview Visual Studio Code — Marketplace

Tips

Congratulations! You now understand how to write an awesome README for your next project. I hope you discovered something new. Examine the official documentation on GitHub now. Have fun coding!

See Also  How to Get a GitHub Access Token for Personal Access

Share This Post

Newest Articles

How to Get a GitHub Access Token for Personal Access

No longer have access to your personal GitHub repository? You can use the GitHub Access Token to open it. Read the full guide here!

How to Make a GitHub Repository Private

Developers can now create a private GitHub repository in the free tier as of January 7, 2019. Read how to get the private repository feature on GitHub here!

3 Methods of How to Install Android SDK Repository

Android is one of the most used operating systems for software development. Read the full guide on how to get the Android SDK here!

How to Turn Off Android Developer Mode

Android Developer Options allows you to access hidden features. If you want to deactivate it, follow this simple guide to turn it off!

5 Simple Ways How to Get Cookie Clicker GitHub

How to get and use Cookie Clicker on GitHub? You can find the simple steps and cheats for Cookie Clicker in this article!

How to Integrate Jira with GitHub in 6 Easy Steps

If you use Jira for your work and need to integrate with another organization that uses GitHub, integration is what you require. Read the details here!