# 2.7 中介資料(Meta Data)

`<meta>`

需放在 `<head>...</head>` 區段之中。

## 語意

該網頁的額外資料，例如關鍵字、簡易描述等資訊，會被瀏覽器解讀。

注意：**\<meta>** 沒有結尾標籤。早期舊的寫法會寫成 **`<meta />`** 。

## 範例 1

```markup
<head>
  <meta charset="utf-8">
</head>
```

瀏覽器會解讀：該網頁的字元集編碼為 **utf-8** 。即支援大多數的文字種類。

## 範例 2

```markup
<head>
  <meta name="keywords" content="HTML, CSS, JavaScript">
  <meta name="description" content="網站前端教學">
  <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes">
  
  <meta http-equiv="refresh" content="3">
</head>
```

`keywords`: 代表此頁面的關鍵字，雖然權重沒那麼高了，但建議養成習慣，加上去比較好。

`description`：有可能會顯示在 google 搜尋結果的說明當中。

`viewport`：未來做 RWD 才會用到。(可直接先加上即可)

`refresh`：此頁面每隔幾秒(範例是每隔 3 秒)會重新整理一次。


---

# 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.webmix.cc/html-and-css/2.-html/2.4-zhong-jie-zi-liao-meta-data.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.
