Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[zh-tw]: translate HTML element <head> #16793

Merged
merged 7 commits into from
Nov 2, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions files/zh-tw/web/html/element/head/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
title: "<head>"
yin1999 marked this conversation as resolved.
Show resolved Hide resolved
slug: Web/HTML/Element/head
---

{{HTMLSidebar}}


Dr-XYZ marked this conversation as resolved.
Show resolved Hide resolved

yin1999 marked this conversation as resolved.
Show resolved Hide resolved
[HTML](/zh-TW/docs/Web/HTML) 中的 **`<head>`** 元素包含有關文件的機器可讀信息(後設資料),例如 [title](/zh-TW/docs/Web/HTML/Element/title)、[scripts](/zh-TW/docs/Web/HTML/Element/script)、[style sheets](/zh-TW/docs/Web/HTML/Element/style)。
Dr-XYZ marked this conversation as resolved.
Show resolved Hide resolved


yin1999 marked this conversation as resolved.
Show resolved Hide resolved
> **備註:**`<head>` 主要保存用於機器處理的訊息,而不是人類可讀的訊息。對於人類可見的訊息,例如頂級標題和列出的作者,請參見 {{HTMLElement("header")}} 元素。

## 屬性

這個元件屬性含有[全域屬性](/zh-TW/docs/HTML/Global_attributes)。


yin1999 marked this conversation as resolved.
Show resolved Hide resolved
## 範例

```html
<!doctype html>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>Document title</title>
</head>
</html>
```

## 技術摘要

<table class="properties">
<tbody>
<tr>
<th scope="row">
<a href="/zh-TW/docs/Web/HTML/Content_categories"
>內容類型</a
>
</th>
<td>無</td>
</tr>
<tr>
<th scope="row">允許內容</th>
<td>
<p>
如果文件是一個 {{HTMLElement("iframe")}}
yin1999 marked this conversation as resolved.
Show resolved Hide resolved
<a href="/zh-TW/docs/Web/HTML/Element/iframe#srcdoc"><code>srcdoc</code></a> 文件,或者如果標題信息來自於更高級的協議(像是 HTML 電子郵件的主題行),則應包含零個或多個元素的後設資料內容。
</p>
<p>
否則,必須包含一個或多個元素的後設資料內容,其中確實包括一個 {{HTMLElement("title")}} 元素。
</p>
</td>
</tr>
<tr>
<th scope="row">標籤省略</th>
<td>
如果
<code>&#x3C;head></code> 元素內的第一個內容是一個元素,則開起標籤可以省略。<br />如果跟在
yin1999 marked this conversation as resolved.
Show resolved Hide resolved
<code>&#x3C;head></code> 元素後面的第一個內容不是空格字符或註釋,則關閉標籤可以省略。
</td>
</tr>
<tr>
<th scope="row">允許父元素</th>
Dr-XYZ marked this conversation as resolved.
Show resolved Hide resolved
Dr-XYZ marked this conversation as resolved.
Show resolved Hide resolved
<td>作為 {{HTMLElement("html")}} 元素的第一個子元素。</td>
</tr>

Dr-XYZ marked this conversation as resolved.
Show resolved Hide resolved
<tr>
<th scope="row">允許的 ARIA roles</th>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<th scope="row">允許的 ARIA roles</th>
<th scope="row">允許的 ARIA 角色</th>

<td>No <code>role</code> permitted</td>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以翻译一下吗

</tr>
<tr>
<th scope="row">DOM 介面</th>
<td>{{domxref("HTMLHeadElement")}}</td>
</tr>
</tbody>
Dr-XYZ marked this conversation as resolved.
Show resolved Hide resolved
</table>

## 規範

{{Specifications}}

## 瀏覽器相容性

{{Compat}}

## 參見

- 可以使用在 `<head>` 的元素:
Dr-XYZ marked this conversation as resolved.
Show resolved Hide resolved

- {{HTMLElement("title")}}
- {{HTMLElement("base")}}
- {{HTMLElement("link")}}
- {{HTMLElement("style")}}
- {{HTMLElement("meta")}}
- {{HTMLElement("script")}}
- {{HTMLElement("noscript")}}
- {{HTMLElement("template")}}
Loading