HTML — 文書要素, 文書メタデータ

4. ~HTMLの要素

【この訳に特有な表記規約】

◎表記記号

4.1. 文書~要素

4.1.1. `html^e 要素

`分類$
なし。 ◎ None.
`この要素を利用できる文脈$
文書の`文書~要素$として。 ◎ As document's document element.
`Wherever a subdocument fragment is allowed in a compound document.^en†
【† 訳すなら、 “複合-文書~内で,下位文書片が許容されている所。” となるが,意図不明。 ~inline~SVGにおける `foreignObject@~SVGembedded#elementdef-foreignObject$e 要素~内での利用を指しているのかもしれない。 ( “複合-文書” とは `Compound Document@https://www.w3.org/TR/CDR/$ 仕様のそれを指すようにも思われるが、 その仕様の策定は打切られた。) 】
`内容~model$
1 個の `head$e 要素, 1 個の `body$e 要素 からなる並び。 ◎ A head element followed by a body element.
`text/html における~tag省略$
`html$e 要素の`開始~tag$は、 要素の内側にある最初のものが`~comment$でないならば,省略できる。 ◎ An html element's start tag can be omitted if the first thing inside the html element is not a comment.
`html$e 要素の`終了~tag$は、 要素の直後に`~comment$が続かないならば,省略できる。 ◎ An html element's end tag can be omitted if the html element is not immediately followed by a comment.
`内容~属性$
`大域~属性$ ◎ Global attributes
`~accessibilityの考慮点$
`html$AA ◎ For authors. For implementers.
`~DOM~interface$
[Exposed=Window]
interface `HTMLHtmlElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();

  // `HTMLHtmlElement$obsMb
};

`html$e 要素は、 ~HTML文書の根を`表現-$する。 ◎ The html element represents the root of an HTML document.

作者には、 根 `html$e 要素に `lang$a 属性を指定して,文書の言語を与えることが奨励される。 これは、 発話合成~toolが利用する発音を決定する, 翻訳~toolが利用する規則を決定する, 等々を援助する。 ◎ Authors are encouraged to specify a lang attribute on the root html element, giving the document's language. This aids speech synthesis tools to determine what pronunciations to use, translation tools to determine what rules to use, and so forth.

次の例における `html$e 要素は、 文書の言語が日本語であることを宣言する。 ◎ The html element in the following example declares that the document's language is English.

`html-1^xCode

4.2. 文書~metadata

4.2.1. `head^e 要素

`分類$
なし。 ◎ None.
`この要素を利用できる文脈$
`html$e 要素~内の最初の要素として。 ◎ As the first element in an html element.
`内容~model$
文書が`~iframe-srcdoc文書$である場合 / ~title情報がより高~levelな~protocolから可用である場合: 0 個~以上の`~metadata内容$要素 — そのうち `title$e, `base$e 要素は各 1 個まで。 ◎ If the document is an iframe srcdoc document or if title information is available from a higher-level protocol: Zero or more elements of metadata content, of which no more than one is a title element and no more than one is a base element.
他の場合: 1 個以上の`~metadata内容$要素 — そのうち `title$e, `base$e 要素は各 1 個まで。 ◎ Otherwise: One or more elements of metadata content, of which exactly one is a title element and no more than one is a base element.
`text/html における~tag省略$
`head$e 要素の`開始~tag$は、 要素は空であるか, または 要素の内側にある最初のものは要素であるならば,省略できる。 ◎ A head element's start tag can be omitted if the element is empty, or if the first thing inside the head element is an element.
`head$e 要素の`終了~tag$は、 要素の直後に[ `~ASCII空白$/`~comment$ ]が続かないならば,省略できる。 ◎ A head element's end tag can be omitted if the head element is not immediately followed by ASCII whitespace or a comment.
`内容~属性$
`大域~属性$ ◎ Global attributes
`~accessibilityの考慮点$
`head$AA ◎ For authors. For implementers.
`~DOM~interface$
[Exposed=Window]
interface `HTMLHeadElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();
};

`head$e 要素は、 `文書$に対する~metadataたちが成す~collectionを`表現-$する。 ◎ The head element represents a collection of metadata for the Document.

`head$e 要素~内の~metadataの総量に上限は無い。 ごく短い例: ◎ The collection of metadata in a head element can be large or small. Here is an example of a very short one:

`head-1^xCode

より長い例: ◎ Here is an example of a longer one:

`head-2^xCode

注記: ほとんどの状況では `title$e 要素が子に要求されるが、 より高~levelな~protocolが~title情報を供している場合は, `title$e 要素を省略できる — 例えば、 ~email著作~形式として~HTMLが利用されている下で,~emailの `件名^i が~title情報を供している場合など。 ◎ The title element is a required child in most situations, but when a higher-level protocol provides title information, e.g., in the subject line of an email when HTML is used as an email authoring format, the title element can be omitted.

4.2.2. `title^e 要素

`分類$
`~metadata内容$。 ◎ Metadata content.
`この要素を利用できる文脈$
他の `title$e 要素を包含していない `head$e 要素~内。 ◎ In a head element containing no other title elements.
`内容~model$
`要素間~空白$でない`~text$。 ◎ Text that is not inter-element whitespace.
`text/html における~tag省略$
両~tagとも省略不可。 ◎ Neither tag is omissible.
`内容~属性$
`大域~属性$ ◎ Global attributes
`~accessibilityの考慮点$
`title$AA ◎ For authors. For implementers.
`~DOM~interface$
[Exposed=Window]
interface `HTMLTitleElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();

  [`CEReactions$] attribute DOMString `text$m;
};

`title$e 要素は、 文書の~titleあるいは名前を`表現-$する。 作者は、 文書を識別するときには,文書が文脈の外で利用されるとき — 例えば,利用者の閲覧履歴や~bookmark, 探索-結果において — でも,~titleを利用するベキである。 文書の~titleは、 最上位の見出し(文書~全体に適用される`見出し内容$)と異なることが多い — 最上位の見出しは、 文脈の外に取り出されたときに自立的である必要はないので。 ◎ The title element represents the document's title or name. Authors should use titles that identify their documents even when they are used out of context, for example in a user's history or bookmarks, or in search results. The document's title is often different from its first heading, since the first heading does not have to stand alone when taken out of context.

`title$e 要素は文書ごとに 1 個まででなければナラナイ。 ◎ There must be no more than one title element per document.

注記: `文書$が~titleを持たないことが適理な場合、 `title$e 要素はおそらく要求されない。 `head$e 要素の内容~modelにおける,この要素がいつ要求されるかの記述を見よ。 ◎ If it's reasonable for the Document to have no title, then the title element is probably not required. See the head element's content model for a description of when the element is required.

%title.`text$m [ = %value ]
要素の`子~text内容$を返す。 ◎ Returns the child text content of the element.
設定して,要素の子たちを所与の値に置換できる。 ◎ Can be set, to replace the element's children with the given value.
`text@m 取得子~手続きは ⇒ ~RET コレの`子~text内容$ ◎ The text attribute's getter must return this title element's child text content.
`text$m 設定子~手続きは ⇒ コレの`全~内容を文字列に置換する$( 所与の値 ) ◎ The text attribute's setter must string replace all with the given value within this title element.

以下に、 適切な~titleの例を,最上位の見出しと対比させながら挙げる。 ◎ Here are some examples of appropriate titles, contrasted with the top-level headings that might be used on those same pages.

`title-1^xCode

同じ~siteには、 次のような~pageもあるかもしれない。 ~titleが当の主題を一義的に述べていることに注意。 一方で,最上位の見出しは、 読者が当の文脈が何であるかすでに知っている — ダンスがサルサやワルツかも…などと戸惑うことはない — ものと見做している: ◎ The next page might be a part of the same site. Note how the title describes the subject matter unambiguously, while the first heading assumes the reader knows what the context is and therefore won't wonder if the dances are Salsa or Waltz:

`title-2^xCode

文書の~titleとして利用する文字列は、 `document.title$m ~IDL属性により与えられる。 ◎ The string to use as the document's title is given by the document.title IDL attribute.

~UAは、 ~UI内で文書を指すときは,文書の~titleを利用するベキである。 `title$e 要素の内容を~UIに利用する場合、 その方向性には,要素の`方向性$を利用するベキである。 ◎ User agents should use the document's title when referring to the document in their user interface. When the contents of a title element are used in this way, the directionality of that title element should be used to set the directionality of the document's title in the user interface.

4.2.3. `base^e 要素

`分類$
`~metadata内容$。 ◎ Metadata content.
`この要素を利用できる文脈$
他の `base$e 要素を包含していない `head$e 要素~内。 ◎ In a head element containing no other base elements.
`内容~model$
`なし$ ◎ Nothing.
`text/html における~tag省略$
`終了~tag$はない。 ◎ No end tag.
`内容~属性$
`大域~属性$ ◎ Global attributes
`href$a — `文書~基底~URL$を与える。 ◎ href — Document base URL
`target$a — [ `~hyperlink$による`~navi$ / `~form提出$ ]用の既定の`~navigable$を与える。 ◎ target — Default navigable for hyperlink navigation and form submission
`~accessibilityの考慮点$
`base$AA ◎ For authors. For implementers.
`~DOM~interface$
[Exposed=Window]
interface `HTMLBaseElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();

  [`CEReactions$] attribute USVString `href$m;
  [`CEReactions$] attribute DOMString `target$m;
};

`base$e 要素により、 作者は,次が可能になる:

  • (`~URL$を構文解析する目的において,`文書~基底~URL$を指定する。
  • `~hyperlinkを追う$目的において,既定の`~navigable$の名前を指定する。

この要素は、 これ以外の内容は`表現-$しない。

◎ The base element allows authors to specify the document base URL for the purposes of parsing URLs, and the name of the default navigable for the purposes of following hyperlinks. The element does not represent any content beyond this information.

同じ文書~内に `base$e 要素が複数個~在ってはナラナイ。 ◎ There must be no more than one base element per document.

`base$e 要素は、[ `href$a, `target$a ]いずれかの属性は有していなければナラナイ。 ◎ A base element must have either an href attribute, a target attribute, or both.

`href@a 内容~属性に指定する値は、 `前後~空白~可の妥当な~URL$でなければナラナイ。 ◎ The href content attribute, if specified, must contain a valid URL potentially surrounded by spaces.

`href$a 属性を有する `base$e 要素は、 文書~tree内の[ `~URL$を値にとるものと定義されている属性を有するような,他のどの要素 ]よりも先に現れなければナラナイ — `html$e 要素は別として (その `manifest$a 属性は、 `base$e 要素からは影響されない)。 ◎ A base element, if it has an href attribute, must come before any other elements in the tree that have attributes defined as taking URLs, except the html element (its manifest attribute isn't affected by base elements).

注記: `href$a 属性を有する `base$e 要素が複数個ある場合、 最初のそれ以外はすべて無視される。 ◎ If there are multiple base elements with href attributes, all but the first are ignored.

`target@a 属性に指定する値は、 `妥当な~navigable~target名または~keyword$を包含していなければナラナイ。 それは、 `文書$内の`~hyperlink$や`~form$により`~navi$が生じるときに,既定で利用される`~navigable$を指定する。 ◎ The target attribute, if specified, must contain a valid navigable target name or keyword, which specifies which navigable is to be used as the default when hyperlinks and forms in the Document cause navigation.

`target$a 属性を有する `base$e 要素は、 文書~tree内の`~hyperlink$を表現するどの要素よりも先に現れなければナラナイ。 ◎ A base element, if it has a target attribute, must come before any elements in the tree that represent hyperlinks.

注記: `target$a 属性を有する `base$e 要素が複数個ある場合、 最初のそれ以外はすべて無視される。 ◎ If there are multiple base elements with target attributes, all but the first are ignored.

`要素の~targetを取得する@ ときは、 所与の ( %要素, [ 文字列/~NULL ] %~target(省略時は ~NULL ) ) に対し,次を走らす: ◎ To get an element's target, given an a, area, or form element element, and an optional string-or-null target (default null), run these steps:

  1. ~Assert: %要素 は[ `a$e / `area$e / `form$e ]要素である。 ◎ ↑
  2. ~IF[ %~target ~EQ ~NULL ]: ◎ If target is null, then:

    1. ~IF[ %要素 は `target^a 属性を有する ] ⇒ %~target ~SET %要素 の `target^a 属性の値 ◎ If element has a target attribute, then set target to that attribute's value.
    2. ~ELSE ⇒ %要素 の`~node文書$が包含する ~EACH( `base$e 要素 %base ) に対し,`~tree順序$で ⇒ ~IF[ %base は `target$a 属性を有する ] ⇒# %~target ~SET %base の `target$a 属性の値; ~BREAK ◎ Otherwise, if element's node document contains a base element with a target attribute, set target to the value of the target attribute of the first such base element.
  3. ~IF[ %~target ~NEQ ~NULL ]~AND[ %~target は`~ASCII~tabや~ASCII改行文字$を包含する ]~AND[ %~target は U+003C (<) を包含する ] ⇒ %~target ~SET `_blank^l ◎ If target is not null, and contains an ASCII tab or newline and a U+003C (<), then set target to "_blank".
  4. ~RET %~target ◎ Return target.

次の条件を満たす `base$e 要素は、 `凍結d基底~URL@ を持つとされる:

  • `href$a 内容~属性を有する, かつ
  • `文書~tree内$にある, かつ
  • 前 2 条件を満たす `base$e 要素のうち,`~tree順序$で最初のものである
◎ A base element that is the first base element with an href content attribute in a document tree has a frozen base URL.\

~UAは、 `base$e 要素において,次のいずれかの状況が生じたときは、 `即時$に,要素の`凍結d基底~URLを設定する$モノトスル: ◎ The frozen base URL must be immediately set for an element whenever any of the following situations occur:

  • 上の条件を満たしていない `base$e 要素が,上の条件を満たすようになったとき。 ◎ The base element becomes the first base element in tree order with an href content attribute in its Document.
  • 上の条件を満たしている `base$e 要素の `href$a 内容~属性が変化したとき。 ◎ The base element is the first base element in tree order with an href content attribute in its Document, and its href content attribute is changed.

`base$e 要素 %要素 の `凍結d基底~URLを設定する@ ときは: ◎ To set the frozen base URL for an element element:

  1. %文書 ~LET %要素 の`~node文書$ ◎ Let document be element's node document.
  2. %~URL~record ~LET `~URL構文解析する$( %要素 の `href$a 内容~属性の値, %文書 の`~fallback基底~URL$, %文書 の`符号化法$doc )

    (したがって、 `base$e 要素の `href$a 内容~属性は,自他の `base$e 要素からは影響されない。)

    ◎ Let urlRecord be the result of parsing the value of element's href content attribute with document's fallback base URL, and document's character encoding. (Thus, the base element isn't affected by itself.)
  3. %要素 の`凍結d基底~URL$ ~SET [ ~AND↓ ならば %~URL~record / ~ELSE_ %文書 の`~fallback基底~URL$ ]:

    • %~URL~record ~NEQ `失敗^i
    • %~URL~record の`~scheme$url ~NIN { `data^l, `javascript^l }
    • `文書に対する基底は許容されるか?$( %~URL~record, %文書 ) ~EQ `許容される^i
    ◎ If any of the following are true: • urlRecord is failure; • urlRecord's scheme is "data" or "javascript"; or • running Is base allowed for Document? on urlRecord and document returns "Blocked", ◎ then set element's frozen base URL to document's fallback base URL and return. ◎ Set element's frozen base URL to urlRecord.

`href@m 取得子~手続きは: ◎ The href IDL attribute, on getting, must return the result of running the following algorithm:

  1. %文書 ~LET コレの`~node文書$ ◎ Let document be element's node document.
  2. %~URL ~LET コレは `href$a 属性を[ 有するならば その値 / 有さないならば 空~文字列 ] ◎ Let url be the value of the href attribute of this element, if it has one, and the empty string otherwise.
  3. %~URL~record ~LET `~URL構文解析する$( %~URL, %文書 の`~fallback基底~URL$, %文書 の`符号化法$doc )

    (したがって、 `base$e 要素の `href$a 内容~属性は,自他の `base$e 要素からは影響されない。)

    ◎ Let urlRecord be the result of parsing url with document's fallback base URL, and document's character encoding. (Thus, the base element isn't affected by other base elements or itself.)
  4. ~IF[ %~URL~record ~EQ `失敗^i ] ⇒ ~RET %~URL ◎ If urlRecord is failure, return url.
  5. ~RET `~URLを直列化する$( %~URL~record ) ◎ Return the serialization of urlRecord.
`href$m 設定子~手続きは ⇒ `href$a 内容~属性を所与の値に設定する ◎ The href IDL attribute, on setting, must set the href content attribute to the given new value.

`target@m ~IDL属性は、 `target$a 内容~属性を`反映する$モノトスル。 ◎ The target IDL attribute must reflect the content attribute of the same name.

`base$e 要素を利用して,`文書~基底~URL$を設定する例: ◎ In this example, a base element is used to set the document base URL:

`base-1^xCode

上の例の~linkは、 `https://www.example.com/news/archives.html^l を指すことになる。 ◎ The link in the above example would be a link to "https://www.example.com/news/archives.html".

4.2.5. `meta^e 要素

`分類$
`~metadata内容$。 ◎ Metadata content.
`itemprop$a 属性を有する場合に限り: `~flow内容$/`句ng内容$ ◎ If the itemprop attribute is present: flow content. ◎ If the itemprop attribute is present: phrasing content.
`この要素を利用できる文脈$
`charset$a 属性を有する場合に限り: `head$e 要素~内。 ◎ ↓
`http-equiv$a 属性を有する場合に限り: `head$e 要素~内。 ◎ If the charset attribute is present, or if the element's http-equiv attribute is in the Encoding declaration state: in a head element. ◎ If the http-equiv attribute is present but not in the Encoding declaration state: in a head element.
[ `http-equiv$a 属性を有していて,その状態 ~NEQ `符号化法~宣言$st ]の場合に限り: `head$e 要素の子である `noscript$e 要素~内。 ◎ If the http-equiv attribute is present but not in the Encoding declaration state: in a noscript element that is a child of a head element.
`name$a 属性を有する場合に限り: `~metadata内容$が期待される所。 ◎ If the name attribute is present: where metadata content is expected.
`itemprop$a 属性を有する場合に限り: [ `~metadata内容$ / `句ng内容$ ]が期待される所。 ◎ If the itemprop attribute is present: where metadata content is expected. ◎ If the itemprop attribute is present: where phrasing content is expected.
`内容~model$
`なし$。 ◎ Nothing.
`text/html における~tag省略$
`終了~tag$はない。 ◎ No end tag.
`内容~属性$
`大域~属性$ ◎ Global attributes
`name$a — ~metadata名を与える。 ◎ name — Metadata name
`http-equiv$a — ~pragma指令を与える。 ◎ http-equiv — Pragma directive
`content$a — 要素の値を与える。 ◎ content — Value of the element
`charset$a — `符号化法~宣言$を与える。 ◎ charset — Character encoding declaration
`media$a — 適用-可能な媒体を与える。 ◎ media — Applicable media
`~accessibilityの考慮点$
`meta$AA ◎ For authors. For implementers.
`~DOM~interface$
[Exposed=Window]
interface `HTMLMetaElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();

  [`CEReactions$] attribute DOMString `name$m;
  [`CEReactions$] attribute DOMString `httpEquiv$m;
  [`CEReactions$] attribute DOMString `content$m;
  [`CEReactions$] attribute DOMString `media$m;
};

  // `HTMLMetaElement$obsMb

`meta$e 要素は、[ `title$e / `base$e / `link$e / `style$e / `script$e ]要素では表出できないような,様々な種類の~metadataを`表現-$する。 ◎ The meta element represents various kinds of metadata that cannot be expressed using the title, base, link, style, and script elements.

`meta$e 要素は、 その各種 属性により,次を表現できる:

  • `name$a 属性による文書~levelの~metadata
  • `http-equiv$a 属性による~pragma指令
  • `charset$a 属性による,~HTML文書が文字列~形に直列化されるとき (例:~network越しの伝送 / ~disk~storage用) の~fileの`符号化法~宣言$。
◎ The meta element can represent document-level metadata with the name attribute, pragma directives with the http-equiv attribute, and the file's character encoding declaration when an HTML document is serialized to string form (e.g. for transmission over the network or for disk storage) with the charset attribute.

この要素には、 次に挙げる属性のうち, どれか 1 つだけを指定しなければナラナイ ⇒# `name$a, `http-equiv$a, `charset$a, `itemprop$a ◎ Exactly one of the name, http-equiv, charset, and itemprop attributes must be specified.

[ `name$a / `http-equiv$a / `itemprop$a ]を指定した場合、 `content$a 属性も指定しなければナラナイ — 他の場合、 省略しなければナラナイ。 ◎ If either name, http-equiv, or itemprop is specified, then the content attribute must also be specified. Otherwise, it must be omitted.

`charset@a 属性は、 文書に利用される符号化法を指定する。 これは、 `符号化法~宣言$である。 属性が在るならば、 その値は文字列 `utf-8^l に`~ASCII大小無視$で合致しなければナラナイ。 ◎ The charset attribute specifies the character encoding used by the document. This is a character encoding declaration. If the attribute is present, its value must be an ASCII case-insensitive match for the string "utf-8".

注記: `meta$e 要素の `charset$a 属性は、 ~XML文書には効果はないが, ~XMLから/への移行を手助けするためとして~XML文書に許容される。 ◎ The charset attribute on the meta element has no effect in XML documents, but is allowed in XML documents in order to facilitate migration to and from XML.

同じ文書~内に 次を満たす `meta$e 要素が複数個~在ってはナラナイ ⇒ `charset$a 属性を有する ◎ There must not be more than one meta element with a charset attribute per document.

`content@a 属性は、 要素が[ 文書~metadata/~pragma指令 ]目的に利用されるときに,その値を与える。 許容される値は、 後続な各~節にて述べるように,正確な文脈に依存する。 ◎ The content attribute gives the value of the document metadata or pragma directive when the element is used for those purposes. The allowed values depend on the exact context, as described in subsequent sections of this specification.

`meta$e 要素が `name@a 属性を有する場合、 それは文書~metadataを設定する。 文書~metadataは、 名値~pairを通して表出される。 要素の[ `name$a, `content$a ]属性が,順に[ 名前, 値 ]を与える。 名前は、 ~metadataのどの側面が設定されているかを指定する。 妥当な名前, および それらの値の意味は、 以下の各~節に述べる。 `meta$e 要素が `content$a 属性を有さない場合、 その~metadataの名値~pairの値~~成分は,空~文字列になる。 ◎ If a meta element has a name attribute, it sets document metadata. Document metadata is expressed in terms of name-value pairs, the name attribute on the meta element giving the name, and the content attribute on the same element giving the value. The name specifies what aspect of metadata is being set; valid names and the meaning of their values are described in the following sections. If a meta element has no content attribute, then the value part of the metadata name-value pair is the empty string.

`media@a 属性は、 当の~metadataがどの媒体に適用されるかを述べる。 その値は,`妥当な媒体~query~list$でなければナラナイ。 `name$a 属性が `theme-color$v 以外の場合、 `media$a 属性には,処理~modelに対する効果は無い — 作者は利用してはナラナイ。 ◎ The media attribute says which media the metadata applies to. The value must be a valid media query list. Unless the name is theme-color, the media attribute has no effect on the processing model and must not be used by authors.

`name@m ~IDL属性は、 `name$a 内容~属性を`反映する$モノトスル。

`content@m ~IDL属性は、 `content$a 内容~属性を`反映する$モノトスル。

`media@m ~IDL属性は、 `media$a 内容~属性を`反映する$モノトスル。

◎ The name, content, and media IDL attributes must reflect the respective content attributes of the same name.\

`httpEquiv@m ~IDL属性は、 `http-equiv$a 内容~属性を`反映する$モノトスル。 ◎ The IDL attribute httpEquiv must reflect the content attribute http-equiv.

4.2.5.1. 標準な~metadata名

この仕様は、 `meta$e 要素に対する `name$a 属性~用に, 以下に挙げる少数の名前を定義する。 ◎ This specification defines a few names for the name attribute of the meta element.

各 名前は、 `~ASCII大小無視$で比較するモノトスル。 ◎ Names are case-insensitive, and must be compared in an ASCII case-insensitive manner.

【 以下に現れる “値” は、 `content$a 属性の値を指す。 】

`application-name@v
値は、 短い自由形の【すなわち,特に追加的な制約はない】文字列であり, ~pageが表現する~web~appの名前を与えていなければナラナイ。 ~pageが~web~appでない場合、 ~metadata名として `application-name$v を利用してはナラナイ。 名前の言語を指定する `lang$a 属性を利用して,~web~app名の翻訳を与えてもヨイ。 ◎ The value must be a short free-form string giving the name of the web application that the page represents. If the page is not a web application, the application-name metadata name must not be used. Translations of the web application's name may be given, using the lang attribute to specify the language of each name.
同じ文書~内に 次を満たす `meta$e 要素が複数個~在ってはナラナイ ⇒ [ 互いに同じ`言語$を伴う ]~AND[ `name$a 属性を有していて,その値は`~ASCII大小無視$で `application-name$v に合致する ] ◎ There must not be more than one meta element with a given language and where the name attribute value is an ASCII case-insensitive match for application-name per document.
~UAは、 ~UIにおいて,~pageの `title$e に代えて~app名を利用してもヨイ — ~titleは、 ~app名のみならず,[ 特定0の時点における~pageの状態sに関連な様な~message ]も含むかもしれないので。 ◎ User agents may use the application name in UI in preference to the page's title, since the title might include status messages and the like relevant to the status of the page at a particular moment in time instead of just being the name of the application.

~UAは、 所与の[ いくつかの言語たちが成す有順序~list %言語~list (例: 英国~英語, 米国~英語, 英語) ]から,利用する~app名を見出すときは、 次の手続きを走らすモノトスル: ◎ To find the application name to use given an ordered list of languages (e.g. British English, American English, and English), user agents must run the following steps:

  1. %既定の言語 ~LET 当の`文書$の`文書~要素$の`言語$ ◎ ↓
  2. ~IF[ %既定の言語 は~UAに未知でない ] ⇒ %言語~list に %既定の言語 を付加する ◎ Let languages be the list of languages. ◎ Let default language be the language of the Document's document element, if any, and if that language is not unknown. ◎ If there is a default language, and if it is not the same language as any of the languages in languages, append it to languages.
  3. %言語~list を成す ~EACH( %言語 ) に対し ⇒ ~IF[ `文書$ 内に下に与える条件を満たす `meta$e 要素は在る ] ⇒ ~RET [ 該当する要素のうち,`~tree順序$で最初のもの ]の `content$a 属性の値

    条件は ⇒ [ 要素の`言語$ ~EQ %言語 ]~AND[ 要素は `name$a 属性を有していて,その値は`~ASCII大小無視$で `application-name$v に合致する ]

    ◎ Let winning language be the first language in languages for which there is a meta element in the Document where the name attribute value is an ASCII case-insensitive match for application-name and whose language is the language in question. ◎ If none of the languages have such a meta element, then return; there's no given application name. ◎ Return the value of the content attribute of the first meta element in the Document in tree order where the name attribute value is an ASCII case-insensitive match for application-name and whose language is winning language.
  4. ~RET ε (~app名は与えられない) ◎ ↑

注記: この~algoは、 ~pageの名前 — 一例として,~bookmarkの~labelなど — を必要とする~browserにより利用されることになる。 ~algoには、 利用者が選好する言語が供されることになる。 ◎ This algorithm would be used by a browser when it needs a name for the page, for instance, to label a bookmark. The languages it would provide to the algorithm would be the user's preferred languages.

`author@v
値は、 自由形の文字列であり, ~pageの作者たちのうち,いずれかの名前を与えていなければナラナイ。 ◎ The value must be a free-form string giving the name of one of the page's authors.
`description@v
値は、 自由形の文字列であり, ~pageについて述べるものでなければナラナイ。 値は、 ~pageの~directory — 例えば探索~engine用 — における利用に適切でなければナラナイ。 ◎ The value must be a free-form string that describes the page. The value must be appropriate for use in a directory of pages, e.g. in a search engine.\
同じ文書~内に 次を満たす `meta$e 要素が複数個~在ってはナラナイ ⇒ `name$a 属性を有していて,その値は`~ASCII大小無視$で `description$v に合致する ◎ There must not be more than one meta element where the name attribute value is an ASCII case-insensitive match for description per document.
`generator@v
値は、 自由形の文字列であり,[ 文書を生成するために利用された~software~package ]のうちいずれかを識別するものでなければナラナイ。 この値は、 ~softwareから~markupが生成されていない~page — 例えば~text~editorで書かれた~pageなど — には,利用してはナラナイ。 ◎ The value must be a free-form string that identifies one of the software packages used to generate the document. This value must not be used on pages whose markup is not generated by software, e.g. pages whose markup was written by a user in a text editor.

“Frontweaver” と称される~toolが、 ~pageの `head$e 要素~内に,~pageを生成した~toolを識別する名前として,自身のそれを出力する例: ◎ Here is what a tool called "Frontweaver" could include in its output, in the page's head element, to identify itself as the tool used to generate the page:

`meta-generator-1^xCode
`keywords@v
値は、 ~pageに関連な~keywordたちが成す,`~commaで分離された~token集合$でなければナラナイ。 ◎ The value must be a set of comma-separated tokens, each of which is a keyword relevant to the page.

次の,高速道路標識についての~pageでは、 `meta$e 要素を利用して,利用者が~page内を~~検索するときに利用し得る,いくつかの~keywordを指定している: ◎ This page about typefaces on British motorways uses a meta element to specify some keywords that users might use to look for the page:

`meta-keywords-1^xCode
注記: 多くの探索~engineは、 これらの~keywordを考慮しない。 この特能は、 歴史的に,結果として利用者の助けにならなくなるような,あてにならない, あるいは探索~engineを誤解させるような~spamにすら利用されてきたので。 ◎ Many search engines do not consider such keywords, because this feature has historically been used unreliably and even misleadingly as a way to spam search engine results in a way that is not helpful for users.

作者が~pageに適用-可能なものとして指定した~keywordたちが成す~listを得するときは、 ~UAは,次の手続きを走らすモノトスル: ◎ To obtain the list of keywords that the author has specified as applicable to the page, the user agent must run the following steps:

  1. %~keyword群 ~LET 空~list ◎ Let keywords be an empty list.
  2. 文書~内の ~EACH( `meta$e 要素 %要素 ) に対し ⇒ ~IF[ %要素 は `name$a 属性を有していて,その値は`~ASCII大小無視$で `keywords$v に合致する ]~AND[ %要素 は `content$a を有する ] ⇒ %~keyword群 に次の結果を連結する ⇒ `~commaで分割する$( %要素 の `content^a 属性の値 ) ◎ For each meta element with a name attribute and a content attribute and where the name attribute value is an ASCII case-insensitive match for keywords: ◎ Split the value of the element's content attribute on commas. ◎ Add the resulting tokens, if any, to keywords.
  3. %~keyword群 から重複するものを除去する ◎ Remove any duplicates from keywords.
  4. ~RET %~keyword群 ◎ Return keywords. This is the list of keywords that the author has specified as applicable to the page.

~UAは、 この値があてになるかどうか疑わしいときは,この情報を利用するベキでない。 ◎ User agents should not use this information when there is insufficient confidence in the reliability of the value.

一例として、 内容~管理~systemにとっては,[ ~siteに特有な探索~engine用~indexを拡充するために,~systemの中で~pageの~keyword情報を利用する ]ことは適理になろう。 一方で、 この情報を利用する大規模な内容~集積者は,[ 不適切な~keywordの利用を通して~rankingを不当に操ろうと試行する利用者 ]を見出す見込みが高いであろう。 ◎ For instance, it would be reasonable for a content management system to use the keyword information of pages within the system to populate the index of a site-specific search engine, but a large-scale content aggregator that used this information would likely find that certain users would try to game its ranking mechanism through the use of inappropriate keywords.

`referrer@v
値は、 `~referrer施策$でなければナラナイ。 それは、 `文書$に対する既定の`~referrer施策$を定義する。 `REFERRERPOLICY$r ◎ The value must be a referrer policy, which defines the default referrer policy for the Document. [REFERRERPOLICY]

ある `meta$e 要素 %要素 に対し,[ %要素 が`文書の中へ挿入された$とき/ %要素 の[ `name$a / `content$a ]内容~属性が変化したとき ]は、 ~UAは,次の~algoを走らすモノトスル: ◎ If any meta element element is inserted into the document, or has its name or content attributes changed, user agents must run the following algorithm:

  1. ~IF[ %要素 は ~OR↓ を満たさない ]…

    • `文書~tree内$にある
    • `name$a 属性を有していて,その値は`~ASCII大小無視$で `referrer$v に合致する
    • `content$a 属性を有していて,その値 ~NEQ 空~文字列

    …ならば ⇒ ~RET

    ◎ If element is not in a document tree, then return. ◎ If element does not have a name attribute whose value is an ASCII case-insensitive match for "referrer", then return. ◎ If element does not have a content attribute, or that attribute's value is the empty string, then return.
  2. %値 ~LET `~ASCII小文字~化する$( %要素 の`content$a 属性の値 ) ◎ Let value be the value of element's content attribute, converted to ASCII lowercase.
  3. ~IF[ %値 は次の表tの 1 列目に挙げるいずれかである ] ⇒ %値 ~SET 同じ行の 2 列目に与える値 ◎ If value is one of the values given in the first column of the following table, then set value to the value given in the second column:

    旧来の値 ~referrer施策
    `never^v `no-referrer$v
    `default^v `既定の~referrer施策$
    `always^v `unsafe-url$v
    `origin-when-crossorigin^v `origin-when-cross-origin$v
    ◎ Legacy value|Referrer policy never|no-referrer default|the default referrer policy always|unsafe-url origin-when-crossorigin|origin-when-cross-origin
  4. ~IF[ %値 は`~referrer施策$である ] ⇒ %要素 の`~node文書$の`施策~容器$docの`~referrer施策$pC ~SET %値 ◎ If value is a referrer policy, then set element's node document's policy container's referrer policy to policy.

注記: 歴史的な理由から、 `referrer$v 用の処理~modelは — 他の標準な~metadata名と違って — 要素が除去されても応答しないし,`~tree順序$も利用しない。 この状態にある `meta$e 要素は、 最も近過去に挿入されたか改変されたものに限り,効果がある。 ◎ For historical reasons, unlike other standard metadata names, the processing model for referrer is not responsive to element removals, and does not use tree order. Only the most-recently-inserted or most-recently-modified meta element in this state has an effect.

`theme-color@v
値は、 ~CSS `color$t 生成規則に合致する文字列でなければナラナイ — これは、 ~UAが~pageや周囲の~UIの表示を~custom化するときに利用すべきと示唆される色を定義する。 例えば~browserは、 指定された色を,~pageの~title~barに利用したり,~UItab~barや~task切替器における強調~色に利用するかもしれない。 ◎ The value must be a string that matches the CSS <color> production, defining a suggested color that user agents should use to customize the display of the page or of the surrounding user interface. For example, a browser might color the page's title bar with the specified value, or use it as a color highlight in a tab bar or task switcher.
同じ~HTML文書の中に 次を満たす `meta$e 要素が複数個~在ってはナラナイ ⇒ [ `name$a 属性を有していて,その値は`~ASCII大小無視$で `theme-color$v に合致する ]~AND[ `media$a 属性を有していて,その値は互いに異なる ] ◎ Within an HTML document, the media attribute value must be unique amongst all the meta elements with their name attribute value set to an ASCII case-insensitive match for theme-color.

この標準~自身【すなわち,この和訳の原文】も、 ~theme色として “WHATWG green” を利用している: ◎ This standard itself uses "WHATWG green" as its theme color:

`meta-theme-color-1^xCode
`media$a 属性を利用すれば、 当の文脈には供された色が利用されるべきであることを述べれる。 ◎ The media attribute may be used to describe the context in which the provided color should be used.

暗な~modeにて,この標準の~theme色 “WHATWG green” のみを利用したいと求めるなら、 `prefers-color-scheme$d 媒体~特能を利用することもできる。 ◎ If we only wanted to use "WHATWG green" as this standard's theme color in dark mode, we could use the prefers-color-scheme media feature:

`meta-theme-color-2^xCode

~pageの~theme色を得するときは、 次の手続きを走らすモノトスル: ◎ To obtain a page's theme color, user agents must run the following steps:

  1. %候補~要素~list ~LET ~AND↓ を満たす `meta$e 要素たちが成す`~tree順序$による~list: ◎ Let candidate elements be the list of all meta elements that meet the following criteria, in tree order:

    • `文書~tree内$にある ◎ the element is in a document tree;
    • `name$a 属性を有していて,その値は`~ASCII大小無視$で `theme-color$v に合致する ◎ the element has a name attribute, whose value is an ASCII case-insensitive match for theme-color; and
    • `content$a 属性を有する ◎ the element has a content attribute.
  2. %候補~要素~list を成す ~EACH( %要素 ) に対し: ◎ For each element in candidate elements:

    1. ~IF[ %要素 は`media$a 属性を有していて,その値は`環境に合致して$いない ] ⇒ ~CONTINUE ◎ If element has a media attribute and the value of element's media attribute does not match the environment, then continue.
    2. %値 ~LET `前後の~ASCII空白~列を剥ぐ$( %要素 の`content$a 属性の値 ) ◎ Let value be the result of stripping leading and trailing ASCII whitespace from the value of element's content attribute.
    3. %色 ~LET `~CSS色~値を構文解析する$( %値 ) ◎ Let color be the result of parsing value.
    4. ~IF[ %色 ~NEQ `失敗^i ] ⇒ ~RET %色 ◎ If color is not failure, then return color.
  3. ~RET ε (~pageには~theme色はない。) ◎ Return nothing (the page has no theme color).

ある `meta$e 要素について,次のいずれかがが生じたときは、 ~UAは上の~algoを再度~走らせて,その結果を影響される~UIに適用するモノトスル:

  • `文書の中へ挿入された$とき
  • `文書から除去された$とき
  • その `name$a 属性が変化したとき
  • その `content$a 属性が変化したとき
  • その `media$a 属性が変化したとき
  • `media$a 属性を有している下で,その値が`環境に合致して$いるかどうかが変化したとき
◎ If any meta elements are inserted into the document or removed from the document, or existing meta elements have their name, content, or media attributes changed, or if the environment changes such that any meta element's media attribute's value may now or may no longer match the environment, user agents must re-run the above algorithm and apply the result to any affected UI.
~UAは、 ~theme色を~UIに利用するときは、 より相応しくなるように,実装に特有な仕方で調整してもヨイ。 例えば、 ~UAが~theme色を背景に利用していて,その上に白い~textで表示することを意図する場合、 必要十分な~contrastを確保するため,~UIのその部位には~theme色を暗くした色を利用するなど。 ◎ When using the theme color in UI, user agents may adjust it in implementation-specific ways to make it more suitable for the UI in question. For example, if a user agent intends to use the theme color as a background and display white text over it, it might use a darker variant of the theme color in that part of the UI, to ensure adequate contrast.
`color-scheme@v
~UAが~pageの背景を欲される`色~scheme$で即時に (~page内のすべての~CSSを読込むまで待機することなく) 描画するのを援助するため、 `meta$e 要素~内には `color-scheme$p 値を供せる。 ◎ To aid user agents in rendering the page background with the desired color scheme immediately (rather than waiting for all CSS in the page to load), a 'color-scheme' value can be provided in a meta element.
値は、 ~CSS `color-scheme$p ~prop用の値の構文に合致する文字列でなければナラナイ。 それは、 `~pageが~supportする色~scheme群$を決定する。 ◎ The value must be a string that matches the syntax for the CSS 'color-scheme' property value. It determines the page's supported color-schemes.

同じ文書~内に 次を満たす `meta$e 要素が複数個~在ってはナラナイ ⇒ `name$a 属性を有していて,その値は`~ASCII大小無視$で `color-scheme$v に合致する ◎ There must not be more than one meta element with its name attribute value set to an ASCII case-insensitive match for color-scheme per document.

【 しかしながら、 下の注記では,複数個の用法が示唆されている。 この(適合性)要件は本当に必要なのか? 】

次の宣言は、 当の~pageは[ 暗な背景~色, 明な前景~色 ]を伴う色~schemeを自覚して取扱えることを指示する: ◎ The following declaration indicates that the page is aware of and can handle a color scheme with dark background colors and light foreground colors:

`meta-color-scheme-1^xCode

`~pageが~supportする色~scheme群$を得するときは、 次の手続きを走らすモノトスル: ◎ To obtain a page's supported color-schemes, user agents must run the following steps:

  1. %候補~要素~list ~LET ~AND↓ を満たす `meta$e 要素たちが成す`~tree順序$による~list: ◎ Let candidate elements be the list of all meta elements that meet the following criteria, in tree order:

    • `文書~tree内$にある ◎ the element is in a document tree;
    • `name$a 属性を有していて,その値は`~ASCII大小無視$で `color-scheme$v に合致する ◎ the element has a name attribute, whose value is an ASCII case-insensitive match for color-scheme; and
    • `content$a 属性を有する ◎ the element has a content attribute.
  2. %候補~要素~list を成す ~EACH( %要素 ) に対し: ◎ For each element in candidate elements:

    1. %構文解析した結果 ~LET `成分~値~listを構文解析する$( %要素 の `content$a 属性の値 ) ◎ Let parsed be the result of parsing a list of component values given the value of element's content attribute.
    2. ~IF[ %構文解析した結果 は妥当な~CSS `color-scheme$p ~prop値である ] ⇒ ~RET %構文解析した結果 ◎ If parsed is a valid CSS 'color-scheme' property value, then return parsed.
  3. ~RET ~NULL ◎ Return null.

ある `meta$e 要素が[ `文書の中へ挿入された$ / `文書から除去された$ ]とき, または 既存の `meta$e 要素の[ `name$a / `content$a ]属性が変化したときは、 ~UAは上の~algoを再度~走らすモノトスル。 ◎ If any meta elements are inserted into the document or removed from the document, or existing meta elements have their name or content attributes changed, user agents must re-run the above algorithm.

注記: これらの規則【色~schemeを得するとき】は,[ 合致する `meta$e 要素を見出すまで,先頭から順に検査する ]ので、 作者は,そのような要素を複数個~供することで旧来の~UA用の~fallbackを取扱える。 それらの要素は — ~CSSにおいて,~propの~fallbackが働くようにするときとは反対に — 旧来の値が新たな値より`後^emに来るように配列する必要がある。 ◎ Because these rules check successive elements until they find a match, an author can provide multiple such values to handle fallback for legacy user agents. Opposite to how CSS fallback works for properties, the multiple meta elements needs to be arranged with the legacy values after the newer values.

4.2.5.2. 他の~metadata名

誰もが、 自前の `定義済み~metadata名の集合に対する拡張@ を作成して利用できる。 そのような拡張を登録するための要件はない。 ◎ Anyone can create and use their own extensions to the predefined set of metadata names. There is no requirement to register such extensions.

しかしながら,次のいずれかに該当する場合、 新たな~metadata名は作成されるベキでない: ◎ However, a new metadata name should not be created in any of the following cases:

  • [ 当の名前, または それに付随する `content$a 属性の値 ]は`~URL$である場合。 この事例では、 `定義済み~link型の集合に対する拡張$として登録することが奨励される (新たな~metadata名は作成せずに)。 ◎ If either the name is a URL, or the value of its accompanying content attribute is a URL; in those cases, registering it as an extension to the predefined set of link types is encouraged (rather than creating a new metadata name).
  • 当の名前には、 ~UAにおける何らかの処理~要件が期待される場合。 この事例では、 標準~化されるべきである。 ◎ If the name is for something expected to have processing requirements in user agents; in that case it ought to be standardized.

また、 新たな~metadata名を作成して利用する前に, `WHATWG Wiki MetaExtensions ~page@https://wiki.whatwg.org/wiki/MetaExtensions$ — 以下,“この~Wiki~page” と略記する — に諮ることが奨励される — [ すでに利用~中にある~metadata名を選んでしまったり,それらの目的と重複する ]のを避けるため,および[ 選んだ名前が,新たな標準~化された名前と衝突する ]のを避けるため。 `WHATWGWIKI$r ◎ Also, before creating and using a new metadata name, consulting the WHATWG Wiki MetaExtensions page is encouraged — to avoid choosing a metadata name that's already in use, and to avoid duplicating the purpose of any metadata names that are already in use, and to avoid new standardized names clashing with your chosen name. [WHATWGWIKI]

誰もが,いつでも、 この~Wiki~pageを編集して,~metadata名を追加してもかまわない。 新たな名前は、 次の情報も伴わせて指定できる: ◎ Anyone is free to edit the WHATWG Wiki MetaExtensions page at any time to add a metadata name. New metadata names can be specified with the following information:

~keyword ( `Keyword^en )
定義される実際の~metadata名。 定義-済みな他の名前と紛らわしいものは、 避けるベキである (例: 文字大小のみ相違するなど)。 ◎ The actual name being defined. The name should not be confusingly similar to any other defined name (e.g. differing only in case).
概略的な記述 ( `Brief description^en )
~metadata名の意味についての,規範的でない短い記述 — 値に要求される形式も含め。 ◎ A short non-normative description of what the metadata name's meaning is, including the format the value is required to be in.
仕様 ( `Specification^en )
~metadata名の意味論と要件についての詳細な記述への~link。 この~Wikiの別の~pageや外部~pageへの~linkにもなり得る。 ◎ A link to a more detailed description of the metadata name's semantics and requirements. It could be another page on the wiki, or a link to an external page.
同義語 ( `Synonyms^en )
処理~要件が正確に同じであるような,他の~metadata名たちが成す~list。 作者は、 同義語による名前を定義して利用するベキでない (その意図は、 ~UAが旧来の内容を~supportできるようにするために限られる)。 誰もが、 実施に利用されていない同義語を除去してもヨイ。 この仕方で登録されるのは、 旧来の内容との互換性のため,同義語として処理される必要がある~metadata名に限られる。 ◎ A list of other names that have exactly the same processing requirements. Authors should not use the names defined to be synonyms (they are only intended to allow user agents to support legacy content). Anyone may remove synonyms that are not used in practice; only names that need to be processed as synonyms for compatibility with legacy content are to be registered in this way.
地位 ( `Status^en )

次のいずれか: ◎ One of the following:

提案-済み ( `Proposed^en )
~metadata名は、 まだ,広くから査読を受けてないか認可されていない。 誰かがそれを提案していて、 それを利用しているか,近いうちに利用することになる。 ◎ The name has not received wide peer review and approval. Someone has proposed it and is, or soon will be, using it.
批准-済み ( `Ratified^en )
~metadata名は、 広くから査読を受け,認可された。 ~metadata名を利用している~pageを取扱う方法を — 不正な仕方で利用された場合も含め — 一義的に定義する仕様がある。 ◎ The name has received wide peer review and approval. It has a specification that unambiguously defines how to handle pages that use the name, including when they use it in incorrect ways.
使用中止 ( `Discontinued^en )
この~metadata名は、 広くから査読を受けた上で,水準に満たないものと判明した。 既存の~pageが この~metadata名を利用していても、 新たな~pageには避けるベキである。 作者が代わりに利用すベキものは、 (もしあれば) “概略的な記述 ” と “仕様” の項に詳細が与えられることになる。 ◎ The metadata name has received wide peer review and it has been found wanting. Existing pages are using this metadata name, but new pages should avoid it. The "brief description" and "specification" entries will give details of what authors should use instead, if anything.
~metadata名が,既存の値とかぶると判明した場合、 除去された上で,既存の値に対する同義語として~listされるベキである。 ◎ If a metadata name is found to be redundant with existing values, it should be removed and listed as a synonym for the existing value.
~metadata名が “提案-済み” の地位で追加されてから, 1 ヶ月~以上 利用されない/指定されない ままにある場合、 この~Wiki~pageから除去されてヨイ。 ◎ If a metadata name is added in the "proposed" state for a period of a month or more without being used or specified, then it may be removed from the WHATWG Wiki MetaExtensions page.
“提案-済み” の地位で追加された~metadata名が,既存の値とかぶるものと判明した場合、 除去された上で,既存の値に対する同義語として~listされるベキである。 “提案-済み” の地位で追加された~metadata名が,有害と判明した場合、 “使用中止” の地位に変更されるベキである。 ◎ If a metadata name is added with the "proposed" status and found to be redundant with existing values, it should be removed and listed as a synonym for the existing value. If a metadata name is added with the "proposed" status and found to be harmful, then it should be changed to "discontinued" status.
誰もがいつでも地位を変更できるが、 上の定義に則る限りにおいて,そうするベキである。 ◎ Anyone can change the status at any time, but should only do so in accordance with the definitions above.
4.2.5.3. ~pragma指令

`http-equiv@a 属性が指定されている `meta$e 要素は、 ~pragma指令になる。 ◎ When the http-equiv attribute is specified on a meta element, the element is a pragma directive.

`http-equiv$a 属性は,`列挙d属性$であり、 次に挙げる~keyword, とり得る状態, それらの対応付けが定義される: ◎ The http-equiv attribute is an enumerated attribute with the following keywords and states:

~keyword 適合か 状態 概略的な記述
`content-language@v `内容~言語$st `~pragma集合の既定の言語$を設定する。
`content-type@v `符号化法~宣言$st `charset$a 設定の代替な形。
`default-style@v `既定の~style$st 既定の`~CSS~stylesheet集合$の`~CSS~stylesheet集合~名$を設定する。
`refresh@v `~refresh$st 時限~redirectとして動作する。
`set-cookie@v `Set-Cookie$st 効果なし。
`x-ua-compatible@v `~X-UA-Compatible$st 実施において, Internet Explorer が この仕様にもっと近く従うよう促す。 【が、仕様においては無視することが要求される。】
`content-security-policy@v `~CSP$st `文書$に対し`~CSP$を`施行する@~CSP3#enforced$。
◎ Keyword|Conforming|State|Brief description content-language|No|Content language|Sets the pragma-set default language. content-type||Encoding declaration|An alternative form of setting the charset. default-style||Default style|Sets the name of the default CSS style sheet set. refresh||Refresh|Acts as a timed redirect. set-cookie|No|Set-Cookie|Has no effect. x-ua-compatible||X-UA-Compatible|In practice, encourages Internet Explorer to more closely follow the specifications. content-security-policy||Content security policy|Enforces a Content Security Policy on a Document.

`meta$e 要素が`文書の中へ挿入された$とき,要素が[ 上のいずれかの状態を表現する `http-equiv$a 属性 ]を有する場合、 ~UAは,その状態に応じて,以下の~listに述べる適切な~algoを走らすモノトスル:

以下、 この節においては:

  • `meta@V は、 当の `meta$e 要素を表すとする。
  • `content@V は、 `meta$V が `content$a 属性を[ 有するならば その値 / 有さないならば ε ]とする。
◎ When a meta element is inserted into the document, if its http-equiv attribute is present and represents one of the above states, then the user agent must run the algorithm appropriate for that state, as described in the following list:
`内容~言語@st ( `http-equiv^a="`content-language$v" ) ◎ Content language state (http-equiv="content-language")
注記: この特能は不適合である。 作者には、 代わりに `lang$a 属性を利用することが奨励される。 ◎ This feature is non-conforming. Authors are encouraged to use the lang attribute instead.

この状態にある~pragmaは、 `~pragma集合の既定の言語@ を設定する。 この~pragmaが成功裡に処理されるまでは、 `~pragma集合の既定の言語$はない: ◎ This pragma sets the pragma-set default language. Until such a pragma is successfully processed, there is no pragma-set default language.

  1. ~IF[ `content$V ~EQ ε ] ⇒ ~RET ◎ If the meta element has no content attribute, then return.
  2. ~IF[ `content$V は ❝, を包含する ] ⇒ ~RET ◎ If the element's content attribute contains a U+002C COMMA character (,) then return.
  3. %入力 ~LET `content$V ◎ Let input be the value of the element's content attribute.
  4. %位置 ~LET %入力 の最初の文字を指している`位置~変数$ ◎ Let position point at the first character of input.
  5. %入力 内の %位置 から`~ASCII空白を読飛ばす$ ◎ Skip ASCII whitespace within input given position.
  6. %候補 ~LET %入力 内の %位置 から `~ASCII空白$以外の`符号位置~並びを収集する$ ◎ Collect a sequence of code points that are not ASCII whitespace from input given position. ◎ Let candidate be the string that resulted from the previous step.
  7. ~IF[ %候補 ~EQ 空~文字列 ] ⇒ ~RET ◎ If candidate is the empty string, return.
  8. `~pragma集合の既定の言語$ ~SET %候補 ◎ Set the pragma-set default language to candidate.

    注記: 値が,~space等で分離された複数個の~tokenからなる場合、 最初の~tokenを除くすべての~tokenは無視される。 ◎ If the value consists of multiple space-separated tokens, tokens after the first are ignored.

注記: この~pragmaは、 全くではないが, 同じ名前の ~HTTP `Content-Language$h ~headerと まるっきり異なる。 `HTTP$r ◎ This pragma is almost, but not quite, entirely unlike the HTTP `Content-Language` header of the same name. [HTTP]
`符号化法~宣言@st ( `http-equiv^a="`content-type$v" ) ◎ Encoding declaration state (http-equiv="content-type")
この状態は、 `charset$a 属性の代替な形であり,その属性を設定することに等しい。 すなわち、 `符号化法~宣言$を与える。 この状態に課される~UA要件すべては、 この仕様の § 構文解析により取扱われる。 ◎ The Encoding declaration state is just an alternative form of setting the charset attribute: it is a character encoding declaration. This state's user agent requirements are all handled by the parsing section of the specification.
`http-equiv$a 属性が`符号化法~宣言$st状態にある下では、 `content$V は[ 次の並びに`~ASCII大小無視$で合致する文字列 ]でなければナラナイ ⇒# `text/html;^l, 0 個~以上の`~ASCII空白$, `charset=utf-8^l ◎ For meta elements with an http-equiv attribute in the Encoding declaration state, the content attribute must have a value that is an ASCII case-insensitive match for a string that consists of: "text/html;", optionally followed by any number of ASCII whitespace, followed by "charset=utf-8".
同じ文書~内に 次を満たす 2 つの `meta$e 要素が在ってはナラナイ ⇒ 一方は[ `符号化法~宣言$st状態にある `http-equiv$a 属性 ]を有していて, 他方は `charset$a 属性を有する ◎ A document must not contain both a meta element with an http-equiv attribute in the Encoding declaration state and a meta element with the charset attribute present.
[ `符号化法~宣言$st状態にある `http-equiv$a 属性を有する `meta$e 要素 ]は、 `~HTML文書$には利用してもヨイが,`~XML文書$に利用してはナラナイ。 ◎ The Encoding declaration state may be used in HTML documents, but elements with an http-equiv attribute in that state must not be used in XML documents.
`既定の~style@st ( `http-equiv^a="`default-style$v" ) ◎ Default style state (http-equiv="default-style")

この~pragmaは、 既定の`~CSS~stylesheet集合~名$を設定する: ◎ This pragma sets the name of the default CSS style sheet set.

  1. ~IF[ `content$V ~IN { ε, 空~文字列 } ] ⇒ ~RET ◎ If the meta element has no content attribute, or if that attribute's value is the empty string, then return.
  2. `選好される~CSS~stylesheet集合~名を変更する$( `content$V ) `CSSOM$r ◎ Change the preferred CSS style sheet set name with the name being the value of the element's content attribute. [CSSOM]
`~refresh@st ( `http-equiv^a="`refresh$v" ) ◎ Refresh state (http-equiv="refresh")
この~pragmaは、 時限~redirectとして動作する。 ◎ This pragma acts as a timed redirect.
各 `文書$には、 真偽値 `宣言的に~refreshするか@ が結付けられ、 初期~時は ~F とする。 ◎ A Document object has an associated will declaratively refresh (a boolean). It is initially false.
  1. ~IF[ `content$V ~IN { ε, 空~文字列 } ] ⇒ ~RET ◎ If the meta element has no content attribute, or if that attribute's value is the empty string, then return.
  2. `共用~宣言的~refresh手続き$( `meta$V の`~node文書$, `content$V, `meta$V ) を走らす ◎ Let input be the value of the element's content attribute. ◎ Run the shared declarative refresh steps with the meta element's node document, input, and the meta element.

`共用~宣言的~refresh手続き@ は、 所与の ( `文書$ %文書, 文字列 %入力, `meta$e 要素 %meta (省略時は ε ) ) に対し,次に従う: ◎ The shared declarative refresh steps, given a Document object document, string input, and optionally a meta element meta, are as follows:

  1. ~IF[ %文書 の`宣言的に~refreshするか$ ~EQ ~T ] ⇒ ~RET ◎ If document's will declaratively refresh is true, then return.
  2. %位置 ~LET %入力 の最初の`符号位置$を指している`位置~変数$ ◎ Let position point at the first code point of input.
  3. %入力 内の %位置 から`~ASCII空白を読飛ばす$ ◎ Skip ASCII whitespace within input given position.
  4. %秒数 ~LET 0 ◎ Let time be 0.
  5. %秒数~文字列 ~LET %入力 内の %位置 から `~ASCII数字$からなる`符号位置~並びを収集する$ ◎ Collect a sequence of code points that are ASCII digits from input given position, and let the result be timeString.
  6. ~IF[ %秒数~文字列 ~EQ 空~文字列 ] ⇒ ~IF[ %位置↗ ~NEQ ❝. ] ⇒ ~RET ◎ If timeString is the empty string, then: ◎ • If the code point in input pointed to by position is not U+002E (.), then return.
  7. ~ELSE ⇒ %秒数 ~LET `負でない整数として構文解析する$( %秒数~文字列 ) ◎ Otherwise, set time to the result of parsing timeString using the rules for parsing non-negative integers.
  8. %入力 内の %位置 から { `~ASCII数字$, ❝. } からなる`符号位置~並びを収集する$ — 結果は無視する。 ◎ Collect a sequence of code points that are ASCII digits and U+002E FULL STOP characters (.) from input given position. Ignore any collected characters.
  9. %~URL~record ~LET %文書 の`~URL$doc ◎ Let urlRecord be document's URL.
  10. ~IF[ %位置↗ ~NEQ ε ]: ◎ If position is not past the end of input, then:

    1. ~IF[ %位置↗ ~NIN { ❝;, ❝,, `~ASCII空白$ } ] ⇒ ~RET ◎ If the code point in input pointed to by position is not U+003B (;), U+002C (,), or ASCII whitespace, then return.
    2. %入力 内の %位置 から`~ASCII空白を読飛ばす$ ◎ Skip ASCII whitespace within input given position.
    3. ~IF[ %位置↗ ~IN { ❝;, ❝, } ] ⇒ %位置 ~INCBY 1 ◎ If the code point in input pointed to by position is U+003B (;) or U+002C (,), then advance position to the next code point.
    4. %入力 内の %位置 から`~ASCII空白を読飛ばす$ ◎ Skip ASCII whitespace within input given position.
  11. ~IF[ %位置↗ ~NEQ ε ]: ◎ If position is not past the end of input, then:

    1. %~URL文字列 ~LET %入力 内の %位置 以降の`符号位置$たちが成す部分文字列 ◎ Let urlString be the substring of input from the code point at position to the end of the string.
    2. ~IF[ %位置↗ ~NIN { ❝U, ❝u } ] ⇒ ~GOTO `引用符を飛ばす^i ◎ If the code point in input pointed to by position is U+0055 (U) or U+0075 (u), then advance position to the next code point. Otherwise, jump to the step labeled skip quotes.
    3. ~IF[ ( %位置 + 1 )↗ ~NIN { ❝R, ❝r } ] ⇒ ~GOTO `構文解析-^i ◎ If the code point in input pointed to by position is U+0052 (R) or U+0072 (r), then advance position to the next code point. Otherwise, jump to the step labeled parse.
    4. ~IF[ ( %位置 + 2 ) ↗ ~NIN { ❝L, ❝l } ] ⇒ ~GOTO `構文解析-^i ◎ If the code point in input pointed to by position is U+004C (L) or U+006C (l), then advance position to the next code point. Otherwise, jump to the step labeled parse.
    5. %位置 ~INCBY 3 ◎ ↑
    6. %入力 内の %位置 から`~ASCII空白を読飛ばす$ ◎ Skip ASCII whitespace within input given position.
    7. ~IF[ %位置↗ ~NEQ ❝= ] ⇒ ~GOTO `構文解析-^i ◎ If the code point in input pointed to by position is U+003D (=), then advance position to the next code point. Otherwise, jump to the step labeled parse.
    8. %位置 ~INCBY 1 ◎ ↑
    9. %入力 内の %位置 から`~ASCII空白を読飛ばす$ ◎ Skip ASCII whitespace within input given position.
    10. `引用符を飛ばす^i:
      ~IF[ %位置↗ ~IN { ❝', ❝" } ]:

      1. %引用符 ~LET %位置↗
      2. %位置 ~INCBY 1
      3. %~URL文字列 ~SET %入力 内の %位置 から %引用符 以外の`符号位置~並びを収集する$
      ◎ Skip quotes: If the code point in input pointed to by position is U+0027 (') or U+0022 ("), then let quote be that code point, and advance position to the next code point. Otherwise, let quote be the empty string. ◎ Set urlString to the substring of input from the code point at position to the end of the string. ◎ If quote is not the empty string, and there is a code point in urlString equal to quote, then truncate urlString at that code point, so that it and all subsequent code points are removed.
    11. `構文解析-^i:
      %~URL~record ~LET `~URLを符号化法の下で相対的に構文解析する$( %~URL文字列, %文書 ) ◎ Parse: Set urlRecord to the result of encoding-parsing a URL given urlString, relative to document.
    12. ~IF[ %~URL~record ~EQ `失敗^i ] ⇒ ~RET ◎ If urlRecord is failure, then return.
  12. %文書 の`宣言的に~refreshするか$ ~SET ~T ◎ Set document's will declaratively refresh to true.
  13. 任意選択で、 次の手続き (A) 〜 (D) のうち,いずれか一つを遂行する: ◎ Perform one or more of the following steps:

    • (A) :
      1. ~IF[ `閲覧~文脈~sandbox化( 自動的な特能 )~flag$ ~IN %文書 の`作動中な~sandbox法~flag集合$ ] ⇒ ~RET
      2. 次のうち,`後に^em生じた方の時点から,ある秒数だけ経過するまで待機する:

        • %文書 が`完全に読込まれた時刻$
        • %meta ~NEQ ε の場合に限り, %meta がこの`文書の中へ挿入された$とき

        この段における秒数は、 利用者/~UA による選好も織り込んで,調整された結果とする。 【!ある秒数が 2 つの時点ごとに個別に調整されるとしても、調整に統合されると見なせば論理的に同じ】

        注記: ここでは、 %文書 — すなわち、 この手続きの初期~時における %meta の`~node文書$ — を利用するのが重要になる。 この時点の %meta の~node文書は、 来たる~refreshに備えて,すでに変化しているかもしれず、 %meta は常に与えられるとは限らない (~HTTP `Refresh$h ~headerの事例では)。

        【 %~URL~record が %文書 自身の~URLの場合、 同じ文書~資源の~refreshが際限なく繰返され得ることになる。 】

      3. ~IF[ %meta ~NEQ ε ]~AND[ 利用者は~redirectを取消した ] ⇒ ~RET
      4. `~navigableを~URLへ~navigateする$( %文書 の`~node~navigable$, %~URL~record, %文書 ) — 次も与える下で ⇒# `履歴~取扱い^i ~SET `replace$hH
      ◎ After the refresh has come due (as defined below), if the user has not canceled the redirect and, if meta is given, document's active sandboxing flag set does not have the sandboxed automatic features browsing context flag set, then navigate document's node navigable to urlRecord using document, with historyHandling set to "replace". ◎ For the purposes of the previous paragraph, a refresh is said to have come due as soon as the later of the following two conditions occurs: ◎ • At least time seconds have elapsed since document's completely loaded time, adjusted to take into account user or user agent preferences. ◎ • If meta is given, at least time seconds have elapsed since meta was inserted into the document document, adjusted to take into account user or user agent preferences. ◎ It is important to use document here, and not meta's node document, as that might have changed between the initial set of steps and the refresh coming due and meta is not always given (in case of the HTTP `Refresh` header).
    • (B) : 利用者に~~許可を請う~UIを供した上で,利用者から~~許可されたなら次を行う ⇒ `~navigableを~URLへ~navigateする$( %文書 の`~node~navigable$, %~URL~record, %文書 ) ◎ Provide the user with an interface that, when selected, navigates document's node navigable to urlRecord using document.
    • (C) : 手続き (A) を遂行しつつ,待機している間に並行して (B) も遂行する。 ◎ ↑
    • (D) : 何もしない。 ◎ Do nothing.

    加えて,~UAは、 利用者に その演算の一部または全部の側面を(他のものに加えて)伝えてもヨイ — 例えば、 ~timerの状態, ~redirectの行先, 等々。 ◎ In addition, the user agent may, as with anything, inform the user of any and all aspects of its operation, including the state of any timers, the destinations of any timed redirects, and so forth.

    `http-equiv$a 属性が`~refresh$st状態にある下では、 `content$V は次のいずれかでなければナラナイ: ◎ For meta elements with an http-equiv attribute in the Refresh state, the content attribute must have a value consisting either of:

    • (1) `妥当な負でない整数$ ◎ just a valid non-negative integer, or
    • (2) 次の並び:

      1. `妥当な負でない整数$
      2. 1 個の ❝;
      3. 1 個~以上の`~ASCII空白$
      4. 文字列 `URL^l に`~ASCII大小無視$で合致する文字列
      5. 1 個の ❝=
      6. `妥当な~URL文字列$であって,その先頭の文字 ~NIN { ❝', ❝" } なるもの
      ◎ a valid non-negative integer, followed by a U+003B SEMICOLON character (;), followed by one or more ASCII whitespace, followed by a substring that is an ASCII case-insensitive match for the string "URL", followed by a U+003D EQUALS SIGN character (=), followed by a valid URL string that does not start with a literal U+0027 APOSTROPHE (') or U+0022 QUOTATION MARK (") character.

    上の (1), (2) における整数は、 現在の~pageが[ (1) の場合は 読込直されるまで / (2) の場合は 並びの最後に与えられる`~URL$にある~pageに置換されるまで ]の秒~数を表現する。 ◎ In the former case, the integer represents a number of seconds before the page is to be reloaded; in the latter case the integer represents a number of seconds before the page is to be replaced by the page at the given URL.

毎 5 分ごとに ~pageを~serverから自動的に読込直すようにする, `head$e 要素~内の~markup例 (ニュース配信サイトの第一面など): ◎ A news organization's front page could include the following markup in the page's head element, to ensure that the page automatically reloads from the server every five minutes:

`meta-refresh-1^xCode

別の~pageに自動的に~refreshさせる~markup例 (スライドショー用に,一連の~pageを順々に示すときなど): ◎ A sequence of pages could be used as an automated slide show by making each page refresh to the next page in the sequence, using markup such as the following:

`meta-refresh-2^xCode
`Set-Cookie@st ( `http-equiv^a="`set-cookie$v" ) ◎ Set-Cookie state (http-equiv="set-cookie")
この~pragmaは不適合であり、 効果は無い。 ◎ This pragma is non-conforming and has no effect.
~UAには、 この~pragmaを無視することが要求される。 ◎ User agents are required to ignore this pragma.
`~X-UA-Compatible@st ( `http-equiv^a="`x-ua-compatible$v" ) ◎ X-UA-Compatible state (http-equiv="x-ua-compatible")
この~pragmaは、 実施においては, Internet Explorer が この仕様にもっと近く従うよう促す。 ◎ In practice, this pragma encourages Internet Explorer to more closely follow the specifications.
`http-equiv$a 属性が`~X-UA-Compatible$st状態にある下では、 `content$V は,[ `IE=edge^l に`~ASCII大小無視$で合致する文字列 ]でなければナラナイ。 ◎ For meta elements with an http-equiv attribute in the X-UA-Compatible state, the content attribute must have a value that is an ASCII case-insensitive match for the string "IE=edge".
~UAには、 この~pragmaを無視することが要求される。 ◎ User agents are required to ignore this pragma.
`~CSP@st ( `http-equiv^a="`content-security-policy$v" ) ◎ Content security policy state (http-equiv="content-security-policy")

この~pragmaは、 `文書$上の`~CSP$を`施行-$する: `CSP$r ◎ This pragma enforces a Content Security Policy on a Document. [CSP]

  1. ~IF[ `meta$V は `head$e 要素の子でない ] ⇒ ~RET ◎ If the meta element is not a child of a head element, return.
  2. ~IF[ `content$V ~IN { ε, 空~文字列 } ] ⇒ ~RET ◎ If the meta element has no content attribute, or if that attribute's value is the empty string, then return.
  3. %施策 ~LET `直列形の~CSPを構文解析する$( `content$V, `meta^l, `enforce^l ) ◎ Let policy be the result of executing Content Security Policy's parse a serialized Content Security Policy algorithm on the meta element's content attribute's value, with a source of "meta", and a disposition of "enforce".
  4. %施策 からすべての[ `report-uri$dir, `frame-ancestors$dir, `sandbox$dir ]`指令$を除去する ◎ Remove all occurrences of the report-uri, frame-ancestors, and sandbox directives from policy.
  5. %施策 を`施行-$する ◎ Enforce the policy policy.
`http-equiv$a 属性が`~CSP$st状態にある下では、 `content$V は、 `妥当な~CSP$でなければナラナイ — 加えて,[ `report-uri$dir / `frame-ancestors$dir / `sandbox$dir ]`指令$を包含してはナラナイ。 この属性に与える`~CSP$は、 現在の文書に対し`施行-$されることになる。 `CSP$r ◎ For meta elements with an http-equiv attribute in the Content security policy state, the content attribute must have a value consisting of a valid Content Security Policy, but must not contain any report-uri, frame-ancestors, or sandbox directives. The Content Security Policy given in the content attribute will be enforced upon the current document. [CSP]
注記: 一部の資源は、 `meta$e 要素を文書に挿入する時点で,すでに~fetch済みになることもアリである。 例えば、[ `~CSP$st 状態にある `http-equiv$a 属性を伴う `meta$e 要素 ]を動的に挿入するに先立って, 当の画像は`可用な画像~list$に格納-済みかもしれない。 そのような~fetch済み資源が,後で`施行-$される`~CSP$により阻止されることは、 保証されない。 ◎ At the time of inserting the meta element to the document, it is possible that some resources have already been fetched. For example, images might be stored in the list of available images prior to dynamically inserting a meta element with an http-equiv attribute in the Content security policy state. Resources that have already been fetched are not guaranteed to be blocked by a Content Security Policy that's enforced late.

`meta$e 要素による施策を利用して,[ ~inline~JSの実行を防止する / すべての~plugin内容を阻止する ]ことにより、 ~XSS攻撃の~riskを軽減する例: ◎ A page might choose to mitigate the risk of cross-site scripting attacks by preventing the execution of inline JavaScript, as well as blocking all plugin content, using a policy such as the following:

`meta-csp-1^xCode

同じ文書~内の複数個の `meta$e 要素が同時に次を満たしてはナラナイ ⇒ `http-equiv$a 属性を有していて,互いに同じ状態にある ◎ There must not be more than one meta element with any particular state in the document at a time.

4.2.5.4. 文書の符号化法の指定-法

`符号化法~宣言@ は、[ 文書を格納する/伝送するために利用される`符号化法$ ]を指定する仕組みである。 【この訳では、 “文字~符号化法” を,単に “符号化法” と略記する。】 ◎ A character encoding declaration is a mechanism by which the character encoding used to store or transmit a document is specified.

Encoding 標準は、 `~UTF-8$`符号化法$の利用,および それを識別するためとして `utf-8^l `符号化法~label$の利用を要求する。 それらの要件により、 文書の`符号化法~宣言$は,存在するならば[ `~ASCII大小無視$で `utf-8^l に合致する`符号化法~label$を指定する ]ことが必要yである。 この宣言の有無に関わらず,文書を符号化するときに利用される実際の`符号化法$docは、 `~UTF-8$でなければナラナイ。 `ENCODING$r ◎ The Encoding standard requires use of the UTF-8 character encoding and requires use of the "utf-8" encoding label to identify it. Those requirements necessitate that the document's character encoding declaration, if it exists, specifies an encoding label using an ASCII case-insensitive match for "utf-8". Regardless of whether a character encoding declaration is present or not, the actual character encoding used to encode the document must be UTF-8. [ENCODING]

上の規則を施行するためには、 著作~toolは,新たに作成する文書に 既定で`~UTF-8$を利用しなければナラナイ。 ◎ To enforce the above rules, authoring tools must default to using UTF-8 for newly-created documents.

次の制約も適用される: ◎ The following restrictions also apply:

  • 符号化法~宣言は、 いかなる種類の`文字~参照$や文字~escapeも利用することなく,直列化しなければナラナイ。 ◎ The character encoding declaration must be serialized without the use of character references or character escapes of any kind.
  • 符号化法~宣言を包含している要素~全体を、 文書の先頭から 1024 ~byteまでの中に直列化しなければナラナイ。 ◎ The element containing the character encoding declaration must be serialized completely within the first 1024 bytes of the document.

加えて、 `meta$e 要素に課される制約に因り,文書~内の `meta$e による符号化法~宣言は 1 個までに限られる。 ◎ In addition, due to a number of restrictions on meta elements, there can only be one meta-based character encoding declaration per document.

`~HTML文書$が ~AND↓ を満たす場合…

  • その~fileは,~BOMから開始されていない
  • その`符号化法$は`~Content-Type~metadata$により明示的に与えられていない
  • `~iframe-srcdoc文書$でない

その文書には、 次のいずれかの属性を有する `meta$e 要素を利用して,符号化法を指定しなければナラナイ ⇒# `charset$a 属性 / `符号化法~宣言$st 状態にある `http-equiv$a 属性

◎ If an HTML document does not start with a BOM, and its encoding is not explicitly given by Content-Type metadata, and the document is not an iframe srcdoc document, then the encoding must be specified using a meta element with a charset attribute or a meta element with an http-equiv attribute in the Encoding declaration state.

注記: すべての文字が~ASCII範囲に符号化されている場合でも,符号化法~宣言は要求される (`~Content-Type~metadata$内に, または明示的に~file内に)。 符号化法は、 利用者が~formに手入力した非~ASCII文字や ~scriptにより生成される~URL, 等々 を処理するために必要になるので。 ◎ A character encoding declaration is required (either in the Content-Type metadata or explicitly in the file) even when all characters are in the ASCII range, because a character encoding is needed to process non-ASCII characters entered by the user in forms, in URLs generated by scripts, and so forth.

~UTF-8でない符号化法を利用した場合、 ~form提出や~URLの符号化-時に,期待されない結果をもたらし得る — それらは、 既定で文書の`符号化法$docを利用するので。 ◎ Using non-UTF-8 encodings can have unexpected results on form submission and URL encodings, which use the document's character encoding by default.

`~iframe-srcdoc文書$である文書には、 `符号化法~宣言$が在ってはナラナイ (この事例では、 文書はその `iframe$e を包含した文書の一部を成すので, その~sourceはすでに復号されている)。 ◎ If the document is an iframe srcdoc document, the document must not have a character encoding declaration. (In this case, the source is already decoded, since it is part of the document that contained the iframe.)

~XMLにおいては、 必要yなら,~XML宣言を利用して 符号化法の情報を~inlineに与えるベキである。 ◎ In XML, the XML declaration should be used for inline character encoding information, if necessary.

~HTMLにおいては、 作者は,次の~markupを文書の先頭近く(の `head$e 要素~内)に含ませれば、 符号化法を`~UTF-8$に宣言できる: ◎ In HTML, to declare that the character encoding is UTF-8, the author could include the following markup near the top of the document (in the head element):

`meta-charset-1^xCode

~XMLにおいては、 他の~markupに先立つ冒頭に,~XML宣言を利用することになる: ◎ In XML, the XML declaration would be used instead, at the very top of the markup:

`xml-encoding-1^xCode

4.2.6. `style^e 要素

`分類$
`~metadata内容$。 ◎ Metadata content.
`この要素を利用できる文脈$
`~metadata内容$が期待される所。 ◎ Where metadata content is expected.
`head$e 要素の子である `noscript$e 要素~内。 ◎ In a noscript element that is a child of a head element.
`内容~model$
`適合t~stylesheet$を与える`~text$。 ◎ Text that gives a conformant style sheet.
`text/html における~tag省略$
両~tagとも省略不可。 ◎ Neither tag is omissible.
`内容~属性$
`大域~属性$ ◎ Global attributes
`~mediaS$a — 適用-可能な媒体を与える。 ◎ media — Applicable media
`~blockingS$a — 要素は`具現化を阻む能性$があるかどうか。 ◎ blocking — Whether the element is potentially render-blocking
この要素の `~titleS$a 属性には, `特別な意味論@#attr-style-title$もあり、 `~CSS~stylesheet集合~名$を与える。 ◎ Also, the title attribute has special semantics on this element: CSS style sheet set name
`~accessibilityの考慮点$
`style$AA ◎ For authors. For implementers.
`~DOM~interface$
[Exposed=Window]
interface `HTMLStyleElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();

  attribute boolean `~disabledS$m;
  [`CEReactions$] attribute DOMString `~mediaS$m;
  [SameObject, PutForwards=`value$m] readonly attribute `DOMTokenList$I `~blockingS$m;

  // `HTMLStyleElement$obsMb
};

`HTMLStyleElement$I includes `LinkStyle$I;

`style$e 要素により、 作者は,~CSS~stylesheetを文書~内に埋込むことが可能になる。 この要素は、 ~style付け処理~modelへの入力の一種であり,利用者向けの内容は`表現-$しない。 ◎ The style element allows authors to embed CSS style sheets in their documents. The style element is one of several inputs to the styling processing model. The element does not represent content for the user.

`~disabledS@m 取得子~手続きは: ◎ The disabled getter steps are:

  1. ~IF[ コレに`結付けられた~CSS~stylesheet$は無い ] ⇒ ~RET ~F ◎ If this does not have an associated CSS style sheet, return false.
  2. ~RET コレに`結付けられた~CSS~stylesheet$の`不能化されるか$ss ◎ If this's associated CSS style sheet's disabled flag is set, return true. ◎ Return false.

`~disabledS$m 設定子~手続きは: ◎ The disabled setter steps are:

  1. ~IF[ コレに`結付けられた~CSS~stylesheet$は無い ] ⇒ ~RET ◎ If this does not have an associated CSS style sheet, return.
  2. コレに`結付けられた~CSS~stylesheet$の`不能化されるか$ss ~SET 所与の値 ◎ If the given value is true, set this's associated CSS style sheet's disabled flag. Otherwise, unset this's associated CSS style sheet's disabled flag.

当の `style$e 要素に`結付けられた~CSS~stylesheet$が無いときに `~disabledS$m 属性に値をアテガっても,効果は無いことに注意: ◎ Importantly, disabled attribute assignments only take effect when the style element has an associated CSS style sheet:

const %style = document.createElement('style');
%style.disabled = true;
%style.textContent = 'body { background-color: red; }';
document.body.append(%style);
console.log(%style.disabled); // false

`~mediaS@a 属性は、 ~styleをどの媒体に適用するかを述べる。 この属性に指定する値は、 `妥当な媒体~query~list$でなければナラナイ。 ~UAは、[ `~mediaS$a 属性の値が`環境に合致して$いて, かつ関連な他の条件にも該当する ]ならば,~styleを適用し、 他の場合は適用しないモノトスル。 ◎ The media attribute says which media the styles apply to. The value must be a valid media query list. The user agent must apply the styles when the media attribute's value matches the environment and the other relevant conditions apply, and must not apply them otherwise.

注記: ~styleの視野は、 例えば ~CSS内の `media^at ~blockの利用により,更に制限され得る。 この仕様は、 そのような更なる制約や要件は上書きしない。 ◎ The styles might be further limited in scope, e.g. in CSS with the use of @media blocks. This specification does not override such further restrictions or requirements.

`~mediaS$a 属性が省略された場合の既定は、 値 `all^l であり,~styleはすべての媒体に既定で適用されることを意味する。 ◎ The default, if the media attribute is omitted, is "all", meaning that by default styles apply to all media.

`~blockingS@a 属性は、 `他を阻む属性$である。 ◎ The blocking attribute is a blocking attribute.

`style$e 要素の `~titleS@a 属性は、 `~CSS~stylesheet集合$ `CSSOM$r を定義する†。 要素が `~titleS$a 属性を有さない場合,その~titleもない††。 `style$e 要素には、 先祖の `title$a 属性は適用されない。 また,要素が`文書~tree内$にない場合、 その `~titleS$a 属性は無視される。 ◎ The title attribute on style elements defines CSS style sheet sets. If the style element has no title attribute, then it has no title; the title attribute of ancestors does not apply to the style element. If the style element is not in a document tree, then the title attribute is ignored. [CSSOM]

【† すなわち、 要素が表現する~stylesheetの`~CSS~stylesheet集合~名$を与える。 この記述は、 要素に指定された~style付け言語は~CSSであることを前提にしている。 】【†† ~style付け言語が~CSSならば、 “~titleがない” とは[ ~stylesheetの`~title$ss ~EQ 空~文字列 ]を意味する。 】

注記: `link$e 要素の `title$aL 属性と同様、 `~titleS$a 属性を有さない `style$e 要素は、 親の `title$a 属性を継承せず,その~style~blockは単に~titleを持たなくなる — この `~titleS$a 属性は、 その点で,他のほとんどの要素の大域~属性である `title$a 属性から相違する。 ◎ The title attribute on style elements, like the title attribute on link elements, differs from the global title attribute in that a style block without a title does not inherit the title of the parent element: it merely has no title.

`style$e 要素の`子~text内容$は、 `適合t~stylesheet$を与えなければナラナイ。 ◎ The child text content of a style element must be that of a conformant style sheet.

`style$e 要素のうち,その`~node文書$の構文解析器により作成されたものは、 `暗黙的に具現化を阻む能性$があるとする。 ◎ A style element is implicitly potentially render-blocking if the element was created by its node document's parser.


`style$e 要素 %要素 に対し,次に挙げるいずれかが生じたときは、 ~UAは, %要素 の`~style~blockを更新する$~algoを走らすモノトスル: ◎ The user agent must run the update a style block algorithm whenever any of the following conditions occur:

  • %要素 は、 ある`~stack^iから~popされたとき。

    `~stack^iとは、 次項のそれも含め,[ `~HTML構文解析器$ / `~XML構文解析器$ ]の`~open要素~stack$を表すとする。

    ◎ The element is popped off the stack of open elements of an HTML parser or XML parser.
  • %要素 は どの`~stack^i上にもない下で、[ `接続されたとき$ / `切断されたとき$ ]。 ◎ The element is not on the stack of open elements of an HTML parser or XML parser, and it becomes connected or disconnected.
  • %要素 の`子~群~変更-時の手続き$が走るとき。 ◎ The element's children changed steps run.

`~style~blockを更新する@ ~algoは、 次に従うとする: ◎ The update a style block algorithm is as follows:

  1. %要素 ~LET 当の `style$e 要素 ◎ Let element be the style element.
  2. ~IF[ %要素 に`結付けられた~CSS~stylesheet$は在る ] ⇒ 当の`~CSS~stylesheetを除去する$ ◎ If element has an associated CSS style sheet, remove the CSS style sheet in question.
  3. ~IF[ %要素 は`接続されて$いない ] ⇒ ~RET ◎ If element is not connected, then return.
  4. ~IF[ %要素 は `type$a 属性を有していて,その値は `~ASCII大小無視$で[ 空~文字列, `text/css^l ]いずれにも合致しない ] ⇒ ~RET ◎ If element's type attribute is present and its value is neither the empty string nor an ASCII case-insensitive match for "text/css", then return.

    注記: 特に、 ~parameterを伴う `type$a 値 — `text/css; charset=utf-8^l など — は、 この~algoを早くに ~RET させる。 ◎ In particular, a type value with parameters, such as "text/css; charset=utf-8", will cause this algorithm to return early.

  5. ~IF[ `要素における~inline型の挙動は~CSPにより阻止されるべきか?$ ( %要素, `style^l, %要素 の`子~text内容$ ) の結果 ~EQ `阻止される^i `CSP$r ] ⇒ ~RET ◎ If the Should element's inline behavior be blocked by Content Security Policy? algorithm returns "Blocked" when executed upon the style element, "style", and the style element's child text content, then return. [CSP]
  6. `~CSS~stylesheetを作成する$ — 次に挙げる~propを伴うよう: ◎ Create a CSS style sheet with the following properties:

    • `種別$ss ~SET `text/css$c ◎ type • text/css
    • `所有者~node$ss ~SET %要素 ◎ owner node • element
    • `媒体$ss ~SET %要素 の `~mediaS$a 属性 ◎ media • The media attribute of element.

      注記: これは、 属性の現在の値の複製ではなく, (場合によってはこの時点では無い)属性への参照である。 `CSSOM^cite が,属性が動的に[ 設定- / 変更- / 除去- ]されたときに何が起こるかを定義する。 ◎ This is a reference to the (possibly absent at this time) attribute, rather than a copy of the attribute's current value. CSSOM defines what happens when the attribute is dynamically set, changed, or removed.

    • `~title$ss ~SET [ 次が満たされるならば %要素 の `~titleS$a 属性 / ~ELSE_ 空~文字列 ] ⇒ %要素 は`文書~tree内$に在る ◎ title • The title attribute of element, if element is in a document tree, or the empty string otherwise.

      注記: これも属性への`参照^emである。 ◎ Again, this is a reference to the attribute.

    • `代替-か$ss ~SET ~F ◎ alternate flag • Unset.
    • `生成元cleanか$ss ~SET ~T ◎ origin-clean flag • Set.
    • `所在$ss ~SET ~NULL ◎ location • ↓
    • `親~CSS~stylesheet$ss ~SET ~NULL ◎ parent CSS style sheet • ↓
    • `所有者~CSS規則$ss ~SET ~NULL ◎ owner CSS rule • null
    • `不能化されるか$ss ~SET その既定の値【すなわち,~F】 ◎ disabled flag • Left at its default value.
    • `~CSS規則~list$ss ⇒ 初期化されないまま。 ◎ CSS rules • Left uninitialized.

      これは~~正しく見えない。 %要素 の`子~text内容$を利用しているはずなので。 `課題 #2997@~HTMLissue/2997$ を見よ。 ◎ This doesn't seem right. Presumably we should be using the element's child text content? Tracked as issue #2997.

  7. ~IF[ %要素 は`~scriptを阻んでいる~stylesheetを供与して$いる ] ⇒ %要素 の`~node文書$の`~scriptを阻んでいる~stylesheet集合$に %要素 を`付加する$set ◎ If element contributes a script-blocking style sheet, append element to its node document's script-blocking style sheet set.
  8. ~IF[ %要素 の `~mediaS$a 属性の値は`環境に合致して$いる ]~AND[ %要素 は`具現化を阻む能性$がある ] ⇒ `具現化を阻む$( %要素 ) ◎ If element's media attribute's value matches the environment and element is potentially render-blocking, then block rendering on element.

[ ~stylesheetに`必須な下位資源$が在る下で それを得する試みが完了するか, ~stylesheetに`必須な下位資源$は無い下で ~stylesheetは構文解析され処理された ]なら、 ~UAは,次の手続きを走らすモノトスル: ◎ Once the attempts to obtain the style sheet's critical subresources, if any, are complete, or, if the style sheet has no critical subresources, once the style sheet has been parsed and processed, the user agent must run these steps:

`必須な下位資源$の~fetchingは、 きちんと定義されていない — おそらく、 `課題 #968@~HTMLissue/968$ が,それ用の最善な解決になろう。 当面の間は、 `必須な下位資源$への`要請$の`具現化を阻んでいるか$rqは, ~IS[ 当の `style$e 要素は現在`具現化を阻んで$いる ]に設定されるべきである。 ◎ Fetching the critical subresources is not well-defined; probably issue #968 is the best resolution for that. In the meantime, any critical subresource request should have its render-blocking set to whether or not the style element is currently render-blocking.

  1. %要素 ~LET 当の~stylesheetに結付けられた `style$e 要素 ◎ Let element be the style element associated with the style sheet in question.
  2. %成功か ~LET ~T ◎ Let success be true.
  3. ~IF[ ~stylesheetの ある`必須な下位資源$を得する試みは、 何らかの理由により失敗した (例: ~DNS~error / ~HTTP 404 応答 / 接続が早々に閉じられた / ~Content-Typeは~supportされていない) ] ⇒ %成功か ~SET ~F ◎ If the attempts to obtain any of the style sheet's critical subresources failed for any reason (e.g., DNS error, HTTP 404 response, a connection being prematurely closed, unsupported Content-Type), set success to false.

    注記: 内容に特有な~error — 例:~CSS構文解析-時や~PNG復号-時の~errorなど — は、 %成功か には影響しない。 ◎ Note that content-specific errors, e.g., CSS parse errors or PNG decoding errors, do not affect success.

  4. `要素~taskを~queueする$( `~network用~task~source$, %要素, 次の手続き ): ◎ Queue an element task on the networking task source given element and the following steps:

    手続きは: ◎ ↑

    1. ~IF[ %成功か ~EQ ~T ] ⇒ `~eventを発火する$( %要素, `load$et ) ◎ If success is true, fire an event named load at element.
    2. ~ELSE ⇒ `~eventを発火する$( %要素, `error$et ) ◎ Otherwise, fire an event named error at element.
    3. ~IF[ %要素 は`~scriptを阻んでいる~stylesheetを供与して$いる ]: ◎ If element contributes a script-blocking style sheet:

      1. %~stylesheet集合 ~LET %要素 の`~node文書$の`~scriptを阻んでいる~stylesheet集合$ ◎ ↓
      2. ~Assert: %要素 ~IN %~stylesheet集合 ◎ Assert: element's node document's script-blocking style sheet set contains element.
      3. %~stylesheet集合 から %要素 を`除去する$ ◎ Remove element from its node document's script-blocking style sheet set.
    4. `具現化を阻まなくする$( %要素 ) ◎ Unblock rendering on element.

`style$e 要素に対しては、 ~stylesheetに`必須な下位資源$があれば,それを得するすべての試みが完了するまで、 要素の`~node文書$に対する~load~eventを`遅延-$するモノトスル。 ◎ The element must delay the load event of the element's node document until all the attempts to obtain the style sheet's critical subresources, if any, are complete.

注記: この仕様は,~style~systemを指定しないが、 ほとんどの~web~browserは,~CSSを~supportするものと期待される。 `CSS$r ◎ This specification does not specify a style system, but CSS is expected to be supported by most web browsers. [CSS]

`~mediaS@m ~IDL属性は、 `~mediaS$a 内容~属性を`反映する$モノトスル。

`~blockingS@m ~IDL属性は、 `~blockingS$a 内容~属性を`反映する$モノトスル。

◎ The media and blocking IDL attributes must each reflect the respective content attributes of the same name.

この要素も `LinkStyle$I ~interface `CSSOM$r を実装する。 ◎ The LinkStyle interface is also implemented by this element. [CSSOM]

適切な要素を利用すれば、 文書に~styleをあてがい直すことも容易になる。 次の文書では、 他の部分は既定の~styleに保ちながら, `em^e で強勢された~textには,~italicでなくした上で明るい赤にする~styleがあてがわれている。 ◎ The following document has its stress emphasis styled as bright red text rather than italics text, while leaving titles of works and Latin words in their default italics. It shows how using appropriate elements enables easier restyling of documents.

`style-1^xCode

4.2.7. ~style付けと~scriptingとの相互作用

~stylesheetは他の資源を参照していない場合 (例: `style$e 要素に与された内部~stylesheetであって, `import^at 規則を含んでいない)、 ~style規則は,`即時$に~scriptに可用にされるモノトスル。 他の場合、 ~style規則は、 `~event~loop$が`描画を更新する$ 段に達した時点で~scriptに可用にされるモノトスル。 ◎ If the style sheet referenced no other resources (e.g., it was an internal style sheet given by a style element with no @import rules), then the style rules must be immediately made available to script; otherwise, the style rules must only be made available to script once the event loop reaches its update the rendering step.

[ `~HTML構文解析器$/`~XML構文解析器$ ]の`文書$の文脈~下にある要素 %要素 が `~scriptを阻んでいる~stylesheetを供与して@ いるとは、 ~AND↓ が満たされることをいう: ◎ An element el in the context of a Document of an HTML parser or XML parser contributes a script-blocking style sheet if all of the following are true:

  • %要素 は、 %構文解析器 により作成された ◎ el was created by that Document's parser.
  • %要素 は、 次を満たす[ `style$e / `link$e ]要素である ⇒ その作成-時には `~style付け~modelに供与する外部~資源~link@~HTMLlinks#link-type-stylesheet$であった ◎ el is either a style element or a link element that was an external resource link that contributes to the styling processing model when the el was created by the parser.
  • %要素 の `media^a 属性の値は、 `環境に合致して$いる ◎ el's media attribute's value matches the environment.
  • %構文解析器 が %要素 を作成した時点で、 %要素 による~stylesheetは可能化された ◎ el's style sheet was enabled when the element was created by the parser.
  • `~event~loop$の `最初の段@~WAPI#step1$に最後に達した時点で[ %要素 の`根$ ~EQ %文書 ]であった ◎ The last time the event loop reached step 1, el's root was that Document.
  • ~UAは %要素 による~stylesheetの読込ngをまだ あきらめていない — ~UAは、 ~stylesheetの読込ngをいつでも あきらめてヨイ。 ◎ The user agent hasn't given up on loading that particular style sheet yet. A user agent may give up on loading a style sheet at any time.

    【 “あきらめる( `give up^en )” とは、 下の注記から, 当の~stylesheetの処理を放棄するとは限らず,後回しにすることも含むようだ。 】

    注記: ~stylesheetを その読込nより前に あきらめることは、 それが最終的に読込まれるとするなら, ~scriptが不正な情報で演算する結果になることを意味する。 例えば、 その~stylesheetは,ある要素の色を緑に設定するとする。 結果の~styleを検分する~scriptは、 ~stylesheetが読込まれる前に実行され, 当の要素は黒(あるいは何であれ既定の色)であると見出すことになる結果、 道を誤るかもしれない (~pageの他所にて,緑に代えて黒を利用するよう裁定するなど)。 実装者は、[ ~scriptが不正な情報を利用すること ]と[ 低速な~network要請が終わるまで何もしないことによる処理能への影響i ]との兼ね合いを図る必要がある。 ◎ Giving up on a style sheet before the style sheet loads, if the style sheet eventually does still load, means that the script might end up operating with incorrect information. For example, if a style sheet sets the color of an element to green, but a script that inspects the resulting style is executed before the sheet is loaded, the script will find that the element is black (or whatever the default color is), and might thus make poor choices (e.g., deciding to use black as the color elsewhere on the page, instead of green). Implementers have to balance the likelihood of a script using incorrect information with the performance impact of doing nothing while waiting for a slow network request to finish.

上の規則に相当するものは、 `~xml-stylesheet$c 処理命令にも適用するものと期待される。 しかしながら、 まだ くまなく究明されていない。 ◎ It is expected that counterparts to the above rules also apply to <?xml-stylesheet?> PIs. However, this has not yet been thoroughly investigated.

各 `文書$は、 `~scriptを阻んでいる~stylesheet集合@ を有する — それは、 `有順序~集合$であり,初期~時は`空$とする。 ◎ A Document has a script-blocking style sheet set, which is an ordered set, initially empty.

`~scriptを阻んでいる~stylesheetは在るか?@ は、 所与の ( `文書$ %文書 ) に対し, ~IS[ ~OR↓ ]を返す: ◎ A Document document has a style sheet that is blocking scripts if the following steps return true:

  • %文書 の`~scriptを阻んでいる~stylesheet集合$は`空$でない ◎ If document's script-blocking style sheet set is not empty, then return true.
  • [ %文書 の`~node~navigable$ %N ~NEQ ~NULL ]~AND[ %N の`容器~文書$nav %D ~NEQ ~NULL ]~AND[ %D の`~scriptを阻んでいる~stylesheet集合$は`空$でない ] ◎ If document's node navigable is null, then return false. ◎ Let containerDocument be document's node navigable's container document. ◎ If containerDocument is non-null and containerDocument's script-blocking style sheet set is not empty, then return true. ◎ Return false.

【 %D に対しても再帰的に容器~文書を検査してはいないことに注意。 】

【!不要】 ◎ A Document has no style sheet that is blocking scripts if it does not have a style sheet that is blocking scripts.