# 格式化你的内容

要格式化文本，只需选择你想要的文字，并从上下文菜单中选择一种格式——或者使用键盘快捷键或 Markdown 语法来格式化文本。

{% hint style="info" %}
我们使用 Mac 按键编写了这些快捷键。请在 **Control** 代替 **⌘（Command）** 在 Windows 或 Linux 操作系统上使用。请查看我们的 [键盘快捷键](/docs/documentation/zh/zi-yuan/keyboard-shortcuts.md) 部分，了解所有操作系统的全部快捷键。
{% endhint %}

### 加粗

键盘快捷键： <kbd>⌘</kbd> + <kbd>B</kbd>

{% tabs %}
{% tab title="Markdown" %}

```markdown
**加粗**
```

{% endtab %}
{% endtabs %}

### 斜体

键盘快捷键： <kbd>⌘</kbd> + <kbd>I</kbd>

{% tabs %}
{% tab title="Markdown" %}

```markdown
_斜体_
```

{% endtab %}
{% endtabs %}

### 删除线

键盘快捷键： <kbd>⇧</kbd> + <kbd>⌘</kbd> + <kbd>S</kbd>

{% tabs %}
{% tab title="Markdown" %}

```markdown
~~删除线~~
```

{% endtab %}
{% endtabs %}

### 代码

键盘快捷键： <kbd>⌘</kbd> + <kbd>E</kbd>

{% tabs %}
{% tab title="Markdown" %}

```markdown
`代码`
```

{% endtab %}
{% endtabs %}

### 链接

键盘快捷键： <kbd>⌘</kbd> + <kbd>K</kbd>

当你为页面上的文本添加链接时，系统会提示你提供该链接。你可以添加任何 URL，但如果你要链接到你空间中的另一页面或某个部分，我们建议 [使用相对链接](/docs/documentation/zh/creating-content/formatting/inline.md#relative-links).

这是 [一个指向外部页面的链接](https://www.gitbook.com).

这是 [一个指向此空间中另一页面的链接](/docs/documentation/zh/creating-content/blocks.md).

这是 [一个指向此页面某个部分的链接](#code).

这是 [一个会启动到特定地址的电子邮件的链接](mailto:support@gitbook.com).

### 文字颜色和背景颜色

点击上下文菜单中的颜色图标，然后为文字或其背景选择一种颜色。

<mark style="color:橙色;">这段文字是橙色的。</mark>

<mark style="background-color:orange;">这段文字的背景是橙色的。</mark>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gitbook.com/docs/documentation/zh/creating-content/formatting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
