# BBCode 语法

## 文字效果

**粗体内容**

```bbcode
[b]粗体内容[/b]
```

*斜体内容*

```bbcode
[i]斜体内容[/i]
```

下划线内容 (此编辑器无效果)

```bbcode
[u]下划线内容[/u]
```

~~删除线内容~~

```bbcode
[s]删除线内容[/s]
```

## 格式

```bbcode
[center]内容[/center] //内容居中
[left]内容[/left]     //左对齐
[right]内容[/right]   //右对齐
```

## 颜色

**语法：**

```
[color=green]我绿了[/color]
[color=yellow]我黄了[/color]
[color=red]我了[/color]
[color=orange]我橙了[/color]
[color=purple]我紫了[/color]
[color=blue]我蓝了[/color]
[color=#2DCEB1]我灵工艺了[/color]
```

**效果：**

<mark style="color:green;">我绿了</mark>

<mark style="color:yellow;">我黄了</mark>

<mark style="color:red;">我红了</mark>

<mark style="color:orange;">我橙了</mark>

<mark style="color:purple;">我紫了</mark>

<mark style="color:blue;">我蓝了</mark>

<mark style="color:green;">我灵工艺了</mark>

## 超链接

<https://nullcraft.org>

[灵工艺](https://nullcraft.org)

```bbcode
[url]https://nullcraft.org[/url]

[url=https://nullcraft.org]灵工艺[/url]
```

## 图片

```bbcode
[img]图片地址[/img]

[img=100x100]指定图片宽度、高度[/img]
```

## 语法高亮

```php
<?php echo 'Hello World'; ?>
```

```bbcode
[code lang=php]<?php echo 'Hello World'; ?> [/code]
```

## 引用内容

> 春眠不觉晓，处处闻啼鸟。

```bbcode
[quote]春眠不觉晓，处处闻啼鸟。[/quote]
```

> **掬水月在手，弄花香满衣。**
>
> ——于良史《春山夜月》

```bbcode
[quote=于良史《春山夜月》]掬水月在手，弄花香满衣。[/quote]
```


---

# 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://docs.nullcraft.org/tutorial/syntax/bbcode.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.
