Markdown Cheatsheet
-
Markdown Quick Reference Guide
Markdown is a lightweight markup language that allows you to create well-formatted text using simple, easy-to-read syntax. It's designed to be intuitive and easy to learn, making it an excellent choice for creating documents, blog posts, and even forum posts.
Markdown is a plain text formatting syntax created by John Gruber in 2004. It's designed to be easily converted to HTML and other rich text formats, making it a popular choice for web-based content. The simplicity of Markdown's syntax allows you to focus on your writing without getting bogged down in complicated code.
Why Markdown?
The main purpose of Markdown is to make it easy to create well-formatted text that can be easily converted to other formats, such as HTML. Some benefits of using Markdown include:
- Simplicity: Markdown's syntax is straightforward and easy to learn, allowing you to focus on your writing instead of complicated formatting code.
- Portability: Markdown files are plain text, making them easy to share and compatible with a wide range of devices and platforms.
- Flexibility: Markdown can be easily converted to a variety of formats, including HTML, PDF, and Microsoft Word, making it a versatile choice for creating content.
- Readability: Markdown's syntax is designed to be easy to read and write, making it an excellent choice for creating documents that need to be easily understood by humans.
- And last but not least, this site fully support these markdowns for you to format your post!
Basic Syntax
In this section, we'll explore the basic syntax of Markdown, including headers, emphasis, lists, links, and images.
Headers
Headers are used to create headings and subheadings in your Markdown document. They help to organize your content and make it easier for readers to navigate.
Different header levels
Markdown supports six levels of headers, corresponding to the HTML tags
<h1>
through<h6>
. The number of hash symbols (#
) you use determines the level of the header.Syntax for creating headers
To create a header, simply prefix the header text with the appropriate number of hash symbols (
#
). For example:# This is an H1 header ## This is an H2 header ### This is an H3 header #### This is an H4 header ##### This is an H5 header ###### This is an H6 header
Emphasis
Emphasis is used to add formatting to your text, such as making it bold, italic, or struck through.
Bold text
To create bold text, wrap the text in double asterisks (
**
) or double underscores (__
). For example:**This text is bold** __This text is also bold__
Italic text
To create italic text, wrap the text in single asterisks (
*
) or single underscores (_
). For example:*This text is italic* _This text is also italic_
Bold and Italic text
To create text that is bold and italic, wrap the text in single asterisks (
*
) within double underscores (_
). For example:__*This text is bold and also italic*__
Strikethrough text
To create strikethrough text, wrap the text in double tildes (
~~
). For example:~~This text is struck through~~
Lists
Lists are a great way to organize information and make it easy for readers to digest. Markdown supports both ordered (numbered) and unordered (bulleted) lists.
Ordered lists
To create an ordered list, simply prefix each item with a number followed by a period. For example:
1. Item one 2. Item two 3. Item three
Unordered lists
To create an unordered list, prefix each item with an asterisk (
*
), a plus sign (+
), or a hyphen (-
). For example:* Item one * Item two * Item three
Nested lists
To create a nested list, indent the nested items with four spaces or a single tab. For example:
1. Item one * Nested item one * Nested item two 2. Item two
Links
Links allow you to direct readers to other resources, such as web pages, email addresses, or other documents.
Inline links
To create an inline link, wrap the link text in square brackets (
[]
) and follow it with the URL in parentheses (()
). For example:[Visit Godot Community](https://godot.community/)
Reference links
To create a reference link, wrap the link text in square brackets (
[]
) and follow it with a reference label, also in square brackets. Then, define the reference label with the URL in parentheses (()
). For example:[Visit Godot Community][1] [1]: https://godot.community/
Email links
To create an email link, wrap the email address in angle brackets (
<>
). For example:<[email protected]>
Images
Images can help to illustrate your content and make it more engaging for readers.
Inline images
To create an inline image, prefix the image alt text with an exclamation mark (
!
), wrap it in square brackets ([]
), and follow it with the image URL in parentheses (()
). For example:![Godot Community logo](https://godot.community/assets/uploads/godot.community.png)
Reference images
To create a reference image, prefix the image alt text with an exclamation mark (
!
), wrap it in square brackets ([]
), and follow it with a reference label, also in square brackets. Then, define the reference label with the image URL in parentheses (()
). For example:![Godot Community logo][1] [1]: https://godot.community/assets/uploads/godot.community.png
Image alt text
Image alt text is used to describe the content of an image and is important for accessibility. To add alt text to an image, simply include it within the square brackets (
[]
) when creating the image.Advanced Syntax
In this section, we'll explore some of the more advanced features of Markdown, including blockquotes, code, tables, and task lists.
Blockquotes
Blockquotes are used to quote text from other sources, such as books, articles, or speeches.
Single level blockquotes
To create a single level blockquote, prefix the quoted text with a greater-than symbol (
>
). For example:> This is a blockquote
Nested blockquotes
To create a nested blockquote, prefix the nested text with additional greater-than symbols (
>
). For example:> This is a blockquote >> This is a nested blockquote
Code
Code formatting is used to display code snippets, commands, or other technical information.
Inline code
To create inline code, wrap the code in single backticks (`). For example:
Use the `print` function to display text in Python.
Code blocks
To create a code block, wrap the code in triple backticks (```) or indent each line with four spaces or a single tab. For example:
This is a code block
Syntax highlighting
Some Markdown parsers, such as GitHub Flavored Markdown, support syntax highlighting for code blocks. To enable syntax highlighting, include the language identifier after the opening triple backticks. For example: ```gdscript
func hello_world(): print("Hello, world!")
Tables
Tables are a useful way to display structured data and make it easy for readers to understand.
Creating tables
To create a table, use vertical bars (
|
) to separate columns and hyphens (-
) to create the header row. For example:| Column 1 | Column 2 | Column 3 | | -------- | -------- | -------- | | Row 1 | Data | Data | | Row 2 | Data | Data |
Table alignment
To align table columns, use colons (
:
) in the header row. For example:| Left-aligned | Center-aligned | Right-aligned | | :----------- | :------------: | ------------: | | Data | Data | Data |
Table formatting
To format table cells, simply include the desired Markdown formatting within the cell. For example:
| Header 1 | Header 2 | | -------- | -------- | | **Bold** | *Italic* |
Horizontal rules
Horizontal rules are used to visually separate sections of your document. To create a horizontal rule, use three or more hyphens (
---
), asterisks (***
), or underscores (___
). For example:---
Task lists
Task lists are a useful way to create to-do lists or track progress on a project.
To create a task list, use a hyphen (
-
) followed by a space and a pair of square brackets ([]
). To mark a task as complete, include anx
within the brackets. For example:- [ ] Task one - [x] Task two - [ ] Task three
Additional Features
In this section, we'll explore some additional features of Markdown, such as escaping characters, automatic URL linking, and emojis and special characters.
Escaping characters
To include a literal character that would otherwise be interpreted as Markdown syntax, simply prefix it with a backslash (
\
). For example:\*This text is not italic\*
Automatic URL linking
Many Markdown parsers will automatically convert plain URLs into clickable links. For example:
https://godot.community/
Emojis and special characters
Some Markdown parsers, such as GitHub Flavored Markdown, support emojis and special characters. To include an emoji or special character, simply include the appropriate code within your text. For example:
:smile: :+1: :sparkles:
For this site, by simply typing
:
followed by any letter, will trigger the emojis Try typing:go
and you can see them custom emojis.Markdown Flavors and Extensions
Markdown has several flavors and extensions that add additional features or modify the behavior of the original syntax.
- CommonMark: CommonMark is a standardized and extensible version of Markdown that aims to maintain compatibility with existing Markdown content while addressing some of the inconsistencies in the original syntax.
- GitHub Flavored Markdown: GitHub Flavored Markdown (GFM) is a Markdown variant used by GitHub that adds additional features, such as task lists, table support, and syntax highlighting for code blocks.
- MultiMarkdown: MultiMarkdown is an extension of Markdown that adds support for features such as footnotes, tables, and citations, making it suitable for more complex documents.
Markdown Editors and Tools
There are many editors and tools available for working with Markdown, including online editors, desktop editors, mobile editors, and preview tools.
Online editors
Desktop editors
Mobile editors
Markdown preview tools
- Markdown Viewer (Chrome extension)
- Markdown Viewer (Firefox add-on)
What Next?
Now that you have a solid understanding of Markdown's syntax and benefits, it's time to explore and practice using this versatile markup language. With the right tools and practice, you'll be able to create beautifully formatted content that's easy to read and share. So go ahead, give Markdown a try, and see how it can improve your writing experience. I hope this Markdown Cheatsheet helps. Happy writing!
-
Stickying this, seems useful reference that people can use for posting
I will write the same for GDScript.
-