> For the complete documentation index, see [llms.txt](https://eemans-organization.gitbook.io/html-formatted-reports/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://eemans-organization.gitbook.io/html-formatted-reports/html-kai-fa/less-than-body-greater-than.md).

# \<body>

## \<body>

\<body>元素是網頁的主要內容區域，用於展示實際的網頁內容給用戶。通過在\<body>中添加適當的元素，您可以創建豐富多樣的網頁內容，使您的網頁更具互動性和吸引力

* 標題：使用\<h1>到\<h6>元素來定義標題，數字越小，字體越大：

```html
// Some code
<h1>這是一個標題1</h1>
<h2>這是一個標題2</h2>
<!-- 依此類推 -->
```

* 段落：使用\<p>元素來創建段落：

```html
// Some code
<p>這是一個段落。</p>
```

* 超連結：使用 元素來創建超連結，href 屬性指定連結的 URL：

```
// Some code
<a href="https://www.example.com">點我前往範例網站</a>
```

* 圖像：可以插入圖像，讓網頁更具吸引力。

```html
// Some code
<img src="image.jpg" alt="圖片描述">
```

* 列表：創建有序或無序列表：

```html
// Some code
<ul>
    <li>項目1</li>
    <li>項目2</li>
</ul>

<ol>
    <li>有序項目1</li>
    <li>有序項目2</li>
</ol>
```

* 分隔線：使用元素來插入水平分隔線：

```html
// Some code
<p>這是一段文本。</p>
<hr>
<p>這是另一段文本。</p>
```

* 表格：您可以使用表格標籤`<table>`、`<tr>`（表格行）、`<td>`（表格數據）、`<th>`（表格標題）等創建結構化的數據呈現。

```html
// Some code
<body>
    <table>
        <tr>
            <th>姓名</th>
            <th>年齡</th>
        </tr>
        <tr>
            <td>小明</td>
            <td>25</td>
        </tr>
        <tr>
            <td>小華</td>
            <td>30</td>
        </tr>
    </table>
</body>
```

表單：使用表單標籤`<form>`和相關元素（如`<input>`、`<textarea>`、`<select>`等）可以收集用戶輸入。

```html
// Some code
<body>
    <form action="/submit" method="post">
        <label for="username">用戶名：</label>
        <input type="text" id="username" name="username">
        <br>
        <label for="password">密碼：</label>
        <input type="password" id="password" name="password">
        <br>
        <input type="submit" value="提交">
    </form>
</body>
```
