Skip to content

Instantly share code, notes, and snippets.

@mkaraki
Last active December 1, 2021 11:22
Show Gist options
  • Save mkaraki/41f51798a1b069bc08a4342f2c024caf to your computer and use it in GitHub Desktop.
Save mkaraki/41f51798a1b069bc08a4342f2c024caf to your computer and use it in GitHub Desktop.
GitHub supported markdown format

GitHub Supported markdown format

Reference

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

####### Heading 7 or more is not available

Heading 1 without #

Heading 2 without ##

Paragraph. Sentence in next line. Sentence in next line with in the end.
This sentence must be in new line.

This must be next paragraph

List

  • You can make list with - .

    • You can nest list with space or tab.
  • You can use * to Italic text.

  • You can use ** to bold text.

  • You can use *** to *Italic and Bold text.

  • You can use ~ to del text.

  • You can use ` to code quote text.

  • You can quote text with ' like 'this is test text'.

  • You can quote text with " like "this is test text".

  • You can make task with - [ ] (unchecked) or - [x] (checked)

  • This is checked example

Numberd list

  1. You can make numberd list with 1.
  2. Next line will auto inclement so, you can use 1. too.

From any numbers

  1. You can start with any number line 4.
  2. But you cannot skip any numbers

Links

Images

Image's behavior is different between GitHub Preview changes and GitHub Preview

You can call image with ![alt text](link).
Image from lorem picsum

You can call image with ![](link). In this case, alt text will unset.

You can make linked image. You have to put image tag into link's text tag like [![alt text](link)](https://example.com).
Image from lorem picsum

The image will side by sided without empty line between them.

hr tag

You can make hr with 3 or more - or * with (or without) spaces:

  • ---
  • ***

example:


Table

No Aligh Left Align Center Align Right Align
Test Test2 Test3 Test4

You have to make least 3 - or : to set align

Quote

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

You can make nested quote:

In publishing and graphic design, Lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document or a typeface without relying on meaningful content. Lorem ipsum may be used as a placeholder before the final copy is available. It is also used to temporarily replace text in a process called greeking, which allows designers to consider the form of a webpage or publication, without the meaning of the text influencing the design.

-- From Wikipedia

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

code block

with 4 space or tab in start of line

void Main(string[], args)
{
    Console.WriteLine("Bonjour");
}

or quote lines with ``` or ~~~

void Main(string[], args)
{
    Console.WriteLine("Bonjour");
}

You can specify language to syntax highlight

void Main(string[], args)
{
    Console.WriteLine("Bonjour");
}

You can also specify file name (but ignored in GitHub Preview)

using System;
class Program {
    void Main(string[], args)
    {
        Console.WriteLine("Bonjour");
    }
}

HTML

You can write html code:

This is div with style `text-align: center;`
In GitHub Preview, you can not use `style` attribute.

By put space between html code, you can use Markdown format to styling. Even if in html element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment