Markdown Cheat Sheet: A Comprehensive Guide for Formatting Text

Markdown is a lightweight markup language used to style text on the web. It's incredibly versatile and allows you to create headings, lists, tables, links, and much more. This cheat sheet provides a quick reference for all your Markdown needs.

Headings

To create a heading, simply add a hash (#) before the text. The number of hashes determines the size of the heading.

# H1
## H2
### H3
#### H4
##### H5
###### H6

Emphasis

To add emphasis to text, use asterisks (*) or underscores (_).

*Italic*
_Italic_

**Bold**
__Bold__

***Bold and Italic***
___Bold and Italic___

Lists

Unordered Lists

To create an unordered list, add a hyphen (-), plus (+), or asterisk (*) before each item.

- Item 1
- Item 2
- Item 3

Ordered Lists

To create an ordered list, add a number followed by a period (.) before each item.

1. Item 1
2. Item 2
3. Item 3

Links

To create a link, use square brackets [] to enclose the text you want to display, then use parentheses () to enclose the URL.

[Google](https://www.google.com)

Images

To add an image, use an exclamation mark (!), followed by square brackets [] to enclose the alt text, and then use parentheses () to enclose the image URL.

![alt text](https://www.example.com/image.jpg)

Code

To add inline code, use backticks (`).

`var x = 5;`

To add a block of code, use three backticks (```).

var x = 5; var y = 10; var z = x + y; console.log(z);

Horizontal Rule

To add a horizontal rule, use three or more hyphens (-), asterisks (*), or underscores (_).

---
***
___

Escape Characters

To use special characters in Markdown, use a backslash () to escape them.

\*This text will not be italicized\*

Markdown is a powerful tool for creating content on the web. With this cheat sheet, you can quickly and easily format text to create professional-looking documents.

Markdown Cheat Sheet: A Comprehensive Guide for Formatting Text

原文地址: https://www.cveoy.top/t/topic/lr1w 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录