Github Markdown Formatting



Sưu tập từ:

You control the display of the document; formatting words as bold or italic, adding images, and creating lists are just a few of the things we can do with Markdown. Mostly, Markdown is just regular text with a few non-alphabetic characters thrown in, like # or. You can use Markdown most places around GitHub.

GitHub Flavored Markdown lets you create useful documents in GitHub and GitHub Enterprise using .md files.Like other varieties of markdown, GitHub Markdown tries to be as readable as possible in its raw form, resulting in an intentionally limited set of formatting options.However, these options can feel restrictive when dealing with complex content.

Although GitHub Markdown strips out most HTML tags, here are a few tricks that can give you more flexibility when formatting your documents.These advanced formatting options can make your documents more useable, but they come at the expense of plain text readability, so use with caution.

  1. Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.
  2. GitHub Flavored Markdown lets you create useful documents in GitHub and GitHub Enterprise using.md files. Like other varieties of markdown, GitHub Markdown tries to be as readable as possible in its raw form, resulting in an intentionally limited set of formatting options. However, these options can feel restrictive when dealing with complex.
  3. You can write Markdown using a plain text editor, then preview and export it to other formats, like HTML. But there are a few Markdown-focused editors that make it easier. They still use plain text—no proprietary formatting—but they flatten the learning curve. My favorite is Typora.

Check out this excellent cheatsheet for an overview of standard formatting in GitHub Markdown.

Images


To left align and resize an image:


Use:


To right align and resize an image:


Use:


To center and resize an image:

Use:


Dropdowns

To create a dropdown containing text:

ExampleThis is a dropdown with text!

Use:


To create a dropdown containing a list:

Example
  • This dropdown contains
  • a list!

Use:


To create a dropdown containing an image:

Example

Use:


To create a dropdown containing code:

Example

Use:


Buttons

To create a single button:

Click here

Use:


To create a row of buttons:

Click hereOr hereOr here

Use:


Anchor links

To link to a heading:

This is an example of an anchor link to a heading.

Use:


Github Markdown Formatting

To create an anchor anywhere on the page, use:

To reference it:

This is an example of an anchor link anywhere on the page.

Use:


Horizontal line

To create a horizontal line:

Use:


Extra space

To add extra space, use one or more:


Make button

Ctrl + C

To make George eat an apple, press Shift+F3

View > Syntax > OpenGL Shading Language > GLSL

File | New

Chữ gạch ngang

~~this~~this

Youtube

SVG Embed (Nhúng SVG)

![soiqualang](http://dev.dothanhlong.org/tmp/t1.svg)

svg html

Random hình ảnh

![Soi's test](https://demo.vinagit.com/AgriVinaGIT/api/randimg/B%C3%B4ng%20v%E1%BA%A3i.jpg)

Github Markdown Table Formatting

Shields

![Soi's test](https://img.shields.io/badge/soiqualang-website-red)

Custom shield

https://img.shields.io/badge/soiqualang-website-red

Top Languages Card

[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=soiqualang&langs_count=8)](https://github.com/soiqualang/Py4Sqlite3)

Compact Language Card Layout

[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=soiqualang&langs_count=8&layout=compact)](https://github.com/soiqualang/Py4Sqlite3)

GitHub Extra Pins

Github Markdown Table Syntax

[![ReadMe Card](https://github-readme-stats.vercel.app/api/pin/?username=soiqualang&repo=Vietnam_map_history)](https://github.com/soiqualang/Vietnam_map_history)

Showing icons

![Anurag's github stats](https://github-readme-stats.vercel.app/api?username=soiqualang&show_icons=true)

Adding private contributions count to total commits count

![Anurag's github stats](https://github-readme-stats.vercel.app/api?username=soiqualang&count_private=true)

References

https://gist.github.com/soiqualang/61bad7aa665290ef1bd034f240ee1b0dGitHub Flavored Markdown Spec - https://github.github.com/gfm/
Advanced Markdown with David Wells - https://github.com/DavidWells/advanced-markdown
Markdown Cheatsheet PDF - https://enterprise.github.com/downloads/en/markdown-cheatsheet.pdf

Article version: GitHub.com
Article version: GitHub.com

Share samples of code with fenced code blocks and enabling syntax highlighting.

In this article

Fenced code blocks

You can create fenced code blocks by placing triple backticks ``` before and after the code block. We recommend placing a blank line before and after code blocks to make the raw formatting easier to read.

Tip: To preserve your formatting within a list, make sure to indent non-fenced code blocks by eight spaces.

Syntax highlighting

You can add an optional language identifier to enable syntax highlighting in your fenced code block.

For example, to syntax highlight Ruby code:

We use Linguist to perform language detection and to select third-party grammars for syntax highlighting. You can find out which keywords are valid in the languages YAML file.

Further reading

  • 'Basic writing and formatting syntax'