【この訳に固有の表記規約】

この訳の,~algoの記述に利用されている各種記号(此れ, ~LET, ~IF, ~RET, 等々)の意味や定義の詳細は、~SYMBOL_DEF_REFを~~参照されたし。

4.1. 文書~要素

4.1.1. `html^e 要素

`分類$
なし。 ◎ None.
`この要素を利用できる文脈$
文書の`文書~要素$として。 ◎ As document's document element.
Wherever a subdocument fragment is allowed in a compound document.†
【† 訳すなら、 “複合~文書~内で,下位文書片が許容されている所。” となるが,意図不明。 ~inline SVG における `foreignObject^e 要素~内での利用を指しているのかもしれない。 ( “複合~文書” とは Compound Document 仕様のそれを指すようにも思われるが、その仕様の策定は放棄されている。) 】
`内容~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
`manifest$a — ~app~cache~manifestを与える。 ◎ manifest — Application cache manifest
`~DOM~interface$
[Exposed=Window,
 `HTMLConstructor$I]
interface `HTMLHtmlElement@I : `HTMLElement$I {};

`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.

`manifest@a 属性は… 【以下、この箇所の和訳は,次の段落を除いて省略する。】

`manifest$a 属性は,旧来の “offline Web applications” 特色機能の一部であり、~Web~platformから除去されつつある過程にある(何年もかかるであろう)。 現時点では、 `manifest$a 属性は利用しないことが~~強く奨励される。 代わりに~service-workerを利用するように。`SW$r

◎ The manifest attribute gives the address of the document's application cache manifest, if there is one. If the attribute is present, the attribute's value must be a valid non-empty URL potentially surrounded by spaces. ◎ The manifest attribute is part of the legacy "offline Web applications" feature, which is in the process of being removed from the Web platform. (This is a long process that takes many years.) Using the manifest attribute at this time is highly discouraged. Use service workers instead. [SW] ◎ The manifest attribute only has an effect during the early stages of document load. Changing the attribute dynamically thus has no effect (and thus, no DOM API is provided for this attribute). ◎ For the purposes of application cache selection, later base elements cannot affect the parsing of URLs in manifest attributes, as the attributes are processed before those elements are seen. ◎ The window.applicationCache IDL attribute provides scripted access to the offline application cache mechanism.

次の例における `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情報がより高次の~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
`~DOM~interface$
[Exposed=Window,
 `HTMLConstructor$I]
interface `HTMLHeadElement@I : `HTMLElement$I {};

`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 要素が子に要求されるが、より高次の~protocolが~title情報を供している場合は, `title$e 要素を省略できる — 例えば、~e-mail著作~形式として~HTMLが利用されている下で,~e-mailの `件名^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 e-mail when HTML is used as an e-mail 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
`~DOM~interface$
[Exposed=Window,
 `HTMLConstructor$I]
interface `HTMLTitleElement@I : `HTMLElement$I {
  [`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 個までで~MUST。 ◎ 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 [ = %値 ]
要素の`子~text内容$を返す。 ◎ Returns the child text content of the element.
設定して,要素の子たちを所与の値に置換できる。 ◎ Can be set, to replace the element's children with the given value.
`text@m
取得子は、此れの`子~text内容$を返さ~MUST。 ◎ The IDL attribute text must return the child text content of the title element.\
設定子は、此れ上の `textContent$m ~IDL属性と同じ仕方で動作し~MUST。 ◎ On setting, it must act the same way as the textContent IDL attribute.

以下に、適切な~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には、次のような頁もあるかもしれない。 ~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$による`~navigate$ / `~form提出$ ]に対する,既定の`閲覧文脈$を与える。 ◎ target — Default browsing context for hyperlink navigation and form submission
`~DOM~interface$
[Exposed=Window,
 `HTMLConstructor$I]
interface `HTMLBaseElement@I : `HTMLElement$I {
  [`CEReactions$] attribute USVString `href$m;
  [`CEReactions$] attribute DOMString `target$m;
};

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

  • ~URLを`相対的に構文解析-$する目的において `文書~基底~URL$を指定する。
  • `~hyperlinkを追う$目的において 既定の`閲覧文脈$の名前を指定する。

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

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

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

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

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

`href$a 属性を有する `base$e 要素は、文書~木~内の[ `~URL$を値にとるものと定義されている属性を有するような,他のどの要素 ]よりも先に現れ~MUST — `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 属性に指定する値は、`妥当な閲覧文脈~名または~keyword$を包含してい~MUST。 それは、`文書$内の`~hyperlink$や`~form$により`~navi$が生じるときに,既定で利用される`閲覧文脈$を指定する。 ◎ The target attribute, if specified, must contain a valid browsing context name or keyword, which specifies which browsing context is to be used as the default when hyperlinks and forms in the Document cause navigation.

`target$a 属性を有する `base$e 要素は、文書~木~内の`~hyperlink$を表現するどの要素よりも先に現れ~MUST。 ◎ 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を取得する@ ときは、所与の ( [ `a$e / `area$e / `form$e ]要素 %要素 ) に対し,次を走らす: ◎ To get an element's target, given an a, area, or form element element, run these steps:

  1. ~IF[ %要素 は `target^a 属性を有する ] ⇒ ~RET その属性~値 ◎ If element has a target attribute, then return that attribute's value.
  2. ~IF[ %要素 の`~node文書$は `target$a 属性を有するような `base$e 要素を包含する ] ⇒ ~RET そのような最初の要素の `target$a 属性の値 ◎ If element's node document contains a base element with a target attribute, then return the value of the target attribute of the first such base element.
  3. ~RET 空~文字列 ◎ Return the empty string.

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

  • `href$a 内容~属性を有する, かつ
  • `文書~木~内$にある, かつ
  • 前 2 条件を満たす `base$e 要素のうち,`木~順序$で最初のものである
◎ 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 要素において,次のいずれかの状況が生じたとき、`即時に$,要素の`凍結~基底~URLを設定-$し~MUST: ◎ 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 要素 %要素 の `凍結~基底~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. ~IF[ %~url~record ~EQ `失敗^i ]~OR[ `文書に対する基底は許容されるか?$( %~url~record, %文書 ) ~EQ `阻止ed^i ] ⇒ %~url~record ~SET %文書 の`~fallback基底~URL$ ◎ Set element's frozen base URL to document's fallback base URL, if urlRecord is failure or running Is base allowed for Document? on the resulting URL record and document returns "Blocked", and to urlRecord otherwise.
  4. %要素 の`凍結~基底~URL$ ~SET %~url~record ◎ ↑
`href@m

取得子は、次の~algoを走らせた結果を返さ~MUST: ◎ 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 )

    (したがって,此れ自身の `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$a 内容~属性を所与の値に設定し~MUST。 ◎ The href IDL attribute, on setting, must set the href content attribute to the given new value.
`target@m
`target$a 内容~属性を`反映-$し~MUST。 ◎ 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内容$/`句内容$ ◎ 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内容$ / `句内容$ ]が期待される所。 ◎ 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
`~DOM~interface$
[Exposed=Window,
 `HTMLConstructor$I]
interface `HTMLMetaElement@I : `HTMLElement$I {
  [`CEReactions$] attribute DOMString `name$m;
  [`CEReactions$] attribute DOMString `httpEquiv$m;
  [`CEReactions$] attribute DOMString `content$m;
};

`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.

この要素には、[ `name$a, `http-equiv$a, `charset$a, `itemprop$a ]属性のうち,いずれか 1 つだけが指定され~MUST。 ◎ Exactly one of the name, http-equiv, charset, and itemprop attributes must be specified.

[ `name$a, `http-equiv$a, `itemprop$a ]のいずれかが指定されている場合、 `content$a 属性も指定され~MUST。 他の場合、省略され~MUST。 ◎ 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大小無視$で合致し~MUST。 ◎ 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 要素が在っては~MUST_NOT ⇒ `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.

`name@m
`content@m
`httpEquiv@m
順に, `name$a, `content$a, `http-equiv$a 内容~属性を`反映-$し~MUST。 ◎ The name and content IDL attributes must reflect the respective content attributes of the same name.\ 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大小無視$で比較され~MUST。 ◎ Names are case-insensitive, and must be compared in an ASCII case-insensitive manner.

`application-name@v
値は、頁が表現する~Web~app名を与える短い自由形の 【すなわち,特に追加の制約はない】 文字列で~MUST。 頁が~Web~appでない場合、~metadata名として `application-name$v が利用されては~MUST_NOT。 名前の言語を指定する `lang$a 属性を利用して,~Web~app名の翻訳を与えても~MAY。 ◎ 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 要素が在っては~MUST_NOT ⇒ [ 互いに同じ`言語$を伴う ]~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において,頁の `title$e に代えて~app名を利用して~MAY — ~titleは、~app名のみならず,[ 特定0の時点における頁の状態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名を見出すときは、次の手続きを走らせ~MUST: ◎ 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. ~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.
  2. %言語~list 内の~EACH( %言語 ) に対し ⇒ ~IF[ `文書$ 内に下に与える条件をいずれも満たすような `meta$e 要素はある ] ⇒ ~RET [ 該当する要素のうち,`木~順序$で最初のもの ]の `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.
  3. ~RET ε (~app名は与えられない) ◎ ↑

注記: この~algoは、頁の名前 — 具体的には ~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
値は、頁の いずれかの作者~名を与える自由形の文字列で~MUST。 ◎ The value must be a free-form string giving the name of one of the page's authors.
`description@v
値は、頁について述べる自由形の文字列で~MUST。 値は、頁の~directory — 例えば検索engine用 — における利用に適切で~MUST。 ◎ 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 要素が在っては~MUST_NOT ⇒ `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のうちいずれかを識別するような,自由形の文字列で~MUST。 この値は、~softwareから~markupが生成されていない頁 — 例えば~text~editorで書かれた頁など — には,利用されては~MUST_NOT。 ◎ 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が、頁の `head$e 要素~内に,頁を生成した~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
値は、頁に関連する~keywordたちからなる,`~comma区切りの~token集合$で~MUST。 ◎ The value must be a set of comma-separated tokens, each of which is a keyword relevant to the page.

次の,高速道路標識についての頁では、 `meta$e 要素を利用して,利用者が頁~内を~~検索するときに利用し得る,いくつかの~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.

作者が頁に適用-可能として指定した~keywordの~listを得るときは、~UAは,次の手続きを走らせ~MUST: ◎ 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~list ~LET 空~list ◎ Let keywords be an empty list.
  2. 文書~内の ~EACH ( `meta$e 要素 %要素 ) に対し ⇒ ~IF[ %要素 は `name$a 属性を有していて,その値は`~ASCII大小無視$で `keywords$v に合致する ]~AND[ %要素 は `content$a を有する ] ⇒ %~keyword~list に次の結果を連結する ⇒ `~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~list から重複するものを除去する ◎ Remove any duplicates from keywords.
  4. ~RET %~keyword~list ◎ 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の中で頁の~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施策$で~MUST。 それは、`文書$に対する既定の`~referrer施策$を定義する。 `REFERRERPOLICY$r ◎ The value must be a referrer policy, which defines the default referrer policy for the Document. [REFERRERPOLICY]

ある `meta$e 要素が[ `文書の中へ挿入された$ / `文書から除去された$ ]とき, または 既存の `meta$e 要素の[ `name$a / `content$a ]属性が変化したときは、~UAは次の~algoを走らせ~MUST: ◎ 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 run the following algorithm:

  1. %候補~要素~list ~LET 次をすべて満たす `meta$e 要素からなる`木~順序$による~list: ◎ Let candidate elements be the list of all meta elements that meet the following criteria, in tree order:

    • `文書~木~内$にある ◎ The element is in a document tree
    • `name$a 属性を有していて,その値は`~ASCII大小無視$で `referrer$v に合致する ◎ The element has a name attribute, whose value is an ASCII case-insensitive match for referrer
    • `content$a 属性を有していて,その値 ~NEQ 空~文字列 ◎ The element has a content attribute, whose value is not the empty string
    • 文書の`~head要素$の子である ◎ The element is a child of the head element of the document
  2. %候補~要素~list 内の ~EACH ( %要素 ) に対し: ◎ For each element in candidate elements:

    1. %値 ~LET `~ASCII小文字~化する$( %要素 の`content$a 属性の値 ) ◎ Let value be the value of element's content attribute, converted to ASCII lowercase.
    2. ~IF[ %値 は次の表の左列に挙げるいずれかである ] ⇒ %値 ~SET 同じ行の右列に与える値 ◎ 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:

      旧来の値◎ Legacy value ~referrer施策◎ Referrer policy
      `never^v `no-referrer$v
      `default^v `no-referrer-when-downgrade$v
      `always^v `unsafe-url$v
      `origin-when-crossorigin^v `origin-when-cross-origin$v

      注記: この段は、 古い~UA向けに~fallback値を配備できるようにする ためにある。 `REFERRERPOLICY$r ◎ ↓

    3. ~IF[ %値 は`~referrer施策$である ] ⇒ %要素 の`~node文書$ の`~referrer施策$doc ~SET %値 ] ◎ If value is a referrer policy, then set element's node document's referrer policy to policy. ◎ The fact that these steps are applied for each element enables deployment of fallback values for older user agents. [REFERRERPOLICY]

`theme-color@v
値は、~CSS `color$t 生成規則に合致する文字列で~MUST — これは、~UAが頁や周囲の~UIの表示を~custom化するときに利用すべきと示唆される色を定義する。 例えば~browserは、指定された色を,頁の~title~barに利用したり,~tab~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.
同じ文書~内に 次を満たす複数の `meta$e 要素が在っては~MUST_NOT ⇒ `name$a 属性を有していて,その値は`~ASCII大小無視$で `theme-color$v に合致する ◎ There must not be more than one meta element with its name attribute value set to an ASCII case-insensitive match for theme-color per document.

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

`meta-theme-color-1^xCode

頁の~theme色を得るときは、次の手続きを走らせ~MUST: ◎ To obtain a page's theme color, user agents must run the following steps:

  1. %候補~要素~list ~LET 次を満たす `meta$e 要素すべてからなる`木~順序$による~list: ◎ Let candidate elements be the list of all meta elements that meet the following criteria, in tree order:

    • `文書~木~内$にある ◎ 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
    • `content$a 属性を有する ◎ The element has a content attribute
  2. %候補~要素~list 内の ~EACH ( %要素 ) に対し: ◎ For each element in candidate elements:

    1. %値 ~LET `前後の~ASCII空白~列を剥ぐ$( %要素 の`content$a 属性の値 ) ◎ Let value be the result of stripping leading and trailing ASCII whitespace from the value of element's content attribute.
    2. %色 ~LET `~CSS色~値として構文解析する$( %値 ) ◎ Let color be the result of parsing value.
    3. ~IF[ %色 ~NEQ `失敗^i ] ⇒ ~RET %色 ◎ If color is not failure, then return color.
  3. ~RET ε (頁には~theme色はない。) ◎ Return nothing (the page has no theme color).
ある `meta$e 要素が[ `文書の中へ挿入された$ / `文書から除去された$ ]とき, または 既存の `meta$e 要素の[ `name$a / `content$a ]属性が変化したときは、~UAは上の~algoを再度~走らせて,その結果を影響される~UIに適用し~MUST ◎ 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 and apply the result to any affected UI.
~UAは、~theme色を~UIに利用するときは、より相応しくなるように,実装~特有の仕方で調整してよい~MAY。 例えば、~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.

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 頁 にあたることが奨励される — すでに利用~中にある~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]

誰もが,いつでも WHATWG Wiki MetaExtensions 頁を編集して,~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 )
定義される実際の~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 )
~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 )
~metadata名の意味論と要件についての詳細な記述への~link。 この~Wikiの別の頁や外部~頁への~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 )
処理~要件が正確に同じであるような,他の~metadata名からなる~list。 作者は、同義語による名前を定義して利用するべきでない — その意図は、~UAが旧来の内容を~supportできるようにするために限られる。 誰もが、実施に利用されていない同義語を除去して~MAY。 この仕方で登録されるのは、旧来の内容との互換性のため,同義語として処理される必要がある~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 )

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

提案-済み ( Proposed )
~metadata名は、まだ,広くから査読を受けてないか認可されていない。 誰かがそれを提案していて、それを利用しているか,近いうちに利用することになる。 ◎ The name has not received wide peer review and approval. Someone has proposed it and is, or soon will be, using it.
批准-済み ( Ratified )
~metadata名は、広くから査読を受け,認可された。 ~metadata名を利用している頁を取扱う方法を — 不正な仕方で利用された場合も含め — 一義的に定義する仕様がある。 ◎ 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 )
この~metadata名は、広くから査読を受けた上で,水準に満たないものと判明した。 既存の頁が この~metadata名を利用していても、新たな頁には避けるべきである。 作者が代わりに利用すべきものは、(もしあれば) “概略的な記述 ” と “仕様” の項に詳細が与えられることになる。 ◎ 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 ヶ月~以上 利用されない/指定されない ままにある場合、 WHATWG Wiki MetaExtensions から除去されて~MAY。 ◎ 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 属性は、`列挙ed属性$である。 次の表の二列目に,この属性~用に定義されている各種~keywordを挙げる。 ~keywordは、同じ行の一列目に与える状態に対応付けられる。 一部の~keywordは、三列目に注記されるように,不適合とされる。 ◎ The http-equiv attribute is an enumerated attribute. The following table lists the keywords defined for this attribute. The states given in the first cell of the rows with keywords give the states to which those keywords map. Some of the keywords are non-conforming, as noted in the last column.

状態 ~keyword 備考◎ Notes
`内容~言語$st `content-language@v 不適合
`符号化法~宣言$st `content-type@v
`既定の~style$st `default-style@v
`~refresh$st `refresh@v
`Set-Cookie$st `set-cookie@v 不適合
`~X-UA-Compatible$st `x-ua-compatible@v 【無視される】
`~CSP$st `content-security-policy@v

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

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

  • `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"
注記: この特色機能は不適合である。 作者には、代わりに `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.

    注記: 値が,空白区切りの複数の~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"
この状態は、 `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大小無視$で合致する文字列 ]で~MUST ⇒# `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: the literal string "text/html;", optionally followed by any number of ASCII whitespace, followed by the literal string "charset=utf-8".

同じ文書~内に 次を満たす 2 つの `meta$e 要素が在っては~MUST_NOT ⇒ 一方は[ `符号化法~宣言$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文書$には利用されても~MAYが,`~XML文書$に利用されては~MUST_NOT。 ◎ 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"

この~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"
この~pragmaは、時限~redirectとして動作する。 ◎ This pragma acts as 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~record$ ◎ Parse: Parse urlString relative to document.\
    12. ~IF[ %~url~record ~EQ ~error ] ⇒ ~RET ◎ If that fails, return. Otherwise, set urlRecord to the resulting URL record.
  12. %文書 の`宣言的に~refreshする?$ ~SET ~T ◎ Set document's will declaratively refresh to true.
  13. %B ~LET %文書 が`属する閲覧文脈$ ◎ ↓
  14. 任意選択で、次の手続き (A) 〜 (D) のうち,いずれか一つを遂行する: ◎ Perform one or more of the following steps:

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

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

        この段における秒数は、利用者/~UA による選好も織り込んで,調整された結果とする。

        注記: ここでは、 %文書 — すなわち、この手続きの初期~時における %meta の`~node文書$ — を利用するのが重要になる。 この時点の %meta の~node文書は、来たる~refreshに備えて,すでに変化しているかもしれないので。

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

      3. ~IF[ %meta ~NEQ ε ]~AND[ 利用者は~redirectを取消した ] ⇒ ~RET
      4. ( `~source閲覧文脈$ %B, `置換~可能化~flag$ ~ON ) を与える下で, %B を %~url~record へ`~navigate$する
      ◎ 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 browsing context to urlRecord, with replacement enabled, and with document's browsing context as the source browsing context. ◎ 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 has completely loaded, 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 the meta element's node document, as that might have changed between the initial set of steps and the refresh coming due.
    • (B) : 利用者に~~許可を請う~UIを供した上で,利用者から~~許可されたなら次を行う ⇒ ( `~source閲覧文脈$ %B ) を与える下で, %B を %~url~record へ`~navigate$する ◎ Provide the user with an interface that, when selected, navigates a browsing context to urlRecord, with document's browsing context as the source browsing context.
    • (C) : 手続き (A) を遂行しつつ,待機している間に並行して (B) も遂行する。 ◎ ↑
    • (D) : 何もしない。 ◎ Do nothing.

    加えて,~UAは、利用者に その演算の一部または全部の側面を(他のものに加えて)伝えて~MAY — 例えば、~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 は次のいずれかで~MUST: ◎ 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) における整数は、現在の頁が[ (1) の場合は 再読込みされるまで / (2) の場合は 並びの最後に与えられる`~URL$にある頁に置換されるまで ]の秒~数を表現する。 ◎ 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 分ごとに 頁を~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

別の頁に自動的に~refreshさせる~markup例(スライドショー用に,一連の頁を順々に示すときなど): ◎ 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"
この~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"
この~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大小無視$で合致する文字列 ]で~MUST。 ◎ 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"

この~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$で~MUST — 加えて,[ `report-uri$dir / `frame-ancestors$dir / `sandbox$dir ]`指令$を包含しては~MUST_NOT。 この属性に与える`~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 要素による施策を利用して,[ ~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 要素が在っては~MUST_NOT ⇒ 互いに同じ状態にあるような `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$を指定する ]ことが必要とされる。 この宣言の有無に関わらず,文書を符号化するときに利用される実際の`符号化法$docは、`~UTF-8$で~MUST。 `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$を利用し~MUST。 ◎ To enforce the above rules, authoring tools must default to using UTF-8 for newly-created documents.

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

  • 符号化法~宣言は、いかなる種類の`文字~参照$や文字~escapeも利用することなく,直列化され~MUST。 ◎ The character encoding declaration must be serialized without the use of character references or character escapes of any kind.
  • 符号化法~宣言を包含している要素の全体が、文書の先頭から 1024 ~byteまでの中に直列化され~MUST。 ◎ 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文書$が次をいずれも満たす場合…:

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

その文書には、次のいずれかの属性を有する `meta$e 要素を利用して,符号化法が指定され~MUST ⇒ `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文書$である文書には、`符号化法~宣言$が在っては~MUST_NOT(この事例では、文書はその `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においては、必要とされるなら,~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$
`適合~stylesheet$を与える`~text$。 ◎ Text that gives a conformant style sheet.
`text/html における~tag省略$
両~tagとも省略不可。 ◎ Neither tag is omissible.
`内容~属性$
`大域~属性$ ◎ Global attributes
`media$a — 適用-可能な媒体を与える。 ◎ media — Applicable media
この要素~上の `~titleS$a 属性には 特別な意味論 もあり,`~CSS~stylesheet集合~名$を与える。 ◎ Also, the title attribute has special semantics on this element: CSS style sheet set name.
`~DOM~interface$
[Exposed=Window,
 `HTMLConstructor$I]
interface `HTMLStyleElement@I : `HTMLElement$I {
  [`CEReactions$] attribute DOMString `media$m;
};
`HTMLStyleElement$I includes `LinkStyle$I;

`style$e 要素により、作者は,~CSS~stylesheetを文書~内に埋込むことが可能になる。 この要素は、~styling処理~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.

`media@a 属性は、~styleをどの媒体に適用するかを述べる。 この属性に指定する値は、`妥当な媒体~query~list$で~MUST。 ~UAは、[ `media$a 属性の値が`環境に合致して$いる, かつ 関連する他の条件にも該当する ]ならば,~styleを適用し~MUST。 他の場合,適用しては~MUST_NOT。 ◎ 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.

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

`style$e 要素~上の `~titleS@a 属性は、`~CSS~stylesheet集合$ `CSSOM$r を定義する†。 要素が `~titleS$a 属性を有さない場合,その~titleもない††。 `style$e 要素には、先祖の `title$a 属性は適用されない。 また,要素が`文書~木~内$にない場合、その `~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集合~名$を与える。 この記述は、要素に指定された~styling言語は~CSSであることを前提にしている。 】【†† ~styling言語が~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内容$は、`適合~stylesheet$を与え~MUST。 ◎ The child text content of a style element must be that of a conformant style sheet.


`style$e 要素 %要素 に対し,次のいずれかが生じたときは、~UAは, %要素 の`~style~blockを更新する$~algoを走らせ~MUST: ◎ The user agent must run the update a style block algorithm whenever one 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.
  • %要素 の`子~text内容~変更-時の手続き$が走るとき。 ◎ The element's child text content change 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[ %要素 の`根$は`~shadow根$でも`文書$でもない ] ⇒ ~RET ◎ If element's root is neither a shadow root nor a document, 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 `阻止ed^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. 次の~propを伴うように,`~CSS~stylesheetを作成する$: ◎ Create a CSS style sheet with the following properties:

    `種別$ss
    `text/css$c
    `所有者~node$ss
    %要素
    `媒体$ss

    %要素 の `media$a 属性 ◎ The media attribute of element.

    注記: これは、属性の現在の値の複製ではなく,(場合によってはこの時点では不在の)属性への参照である。 CSSOM 仕様が,属性が動的に[ 設定- / 変更- / 除去- ]されたときに何が起こるかを定義する。 ◎ This is a reference to the (possibly absent at this time) attribute, rather than a copy of the attribute's current value. The CSSOM specification defines what happens when the attribute is dynamically set, changed, or removed.
    `~title$ss
    %要素 は`文書~木~内$に[ あるならば %要素 の `~titleS$a 属性 / ないならば 空~文字列 ] ◎ The title attribute of element, if element is in a document tree, or the empty string otherwise.
    注記: これも属性への参照である。 ◎ Again, this is a reference to the attribute.
    `代替-~flag$ss
    ~OFF ◎ Unset.
    `生成元clean~flag$ss
    ~ON ◎ Set.
    `所在$ss
    `親~CSS~stylesheet$ss
    `所有者~CSS規則$ss
    ~NULL
    `不能化~flag$ss
    その既定の値 【すなわち,~OFF】 ◎ Left at its default value.
    `~CSS規則~list$ss
    初期化されないまま。 ◎ Left uninitialized.
    これは~~正しく見えない。 %要素 の`子~text内容$を利用しているはずなので。 issue #2997 ◎ This doesn't seem right. Presumably we should be using the element's child text content? Tracked as issue #2997.

~UAは、下記 (1), (2) いずれかが生じた時点で,次をし~MUST ⇒ 次を走らす`~taskを~queueする$ ⇒ `style$e 要素に向けて,名前[ (1) の場合は `load$et / (2) の場合は `error$et ]の`~eventを発火する$

  • (1) 要素による~stylesheetが — `必須の下位資源$がある場合は、それらもすべて含めて — 失敗することなく読込まれた後,それを構文解析し,処理し終えた
  • (2) 前項に該当し得ないことが判明した

この要件の目的における失敗とは、~network~errorによる それに限るとする(例: ~DNS~error / ~HTTP 404 応答 / 接続が早々に閉じられた / ~Content-Typeは未supportである)。 ~stylesheetやその下位資源を処理する際の非~network~error(例: ~CSS構文解析-時/~PNG復号-時の~errorなど)は、失敗とはされない。

◎ 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, if the loads were successful or there were none, queue a task to fire an event named load at the style element, or, if one of the style sheet's critical subresources failed to completely load for any reason (e.g. DNS error, HTTP 404 response, a connection being prematurely closed, unsupported Content-Type), queue a task to fire an event named error at the style element. Non-network errors in processing the style sheet or its subresources (e.g. CSS parse errors, PNG decoding errors) are not failures for the purposes of this paragraph.

これらの`~task$の`~task源$は、`~DOM操作~task源$とする。 ◎ The task source for these tasks is the DOM manipulation task source.

`style$e 要素に対しては、~stylesheetに`必須の下位資源$があれば,それを得るすべての試みが完了するまで、要素の`~node文書$に対する~load~eventを`遅延-$し~MUST。 ◎ 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]

`media@m
`media$a 内容~属性を`反映-$し~MUST。 ◎ The media and nonce IDL attributes must 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.~stylingと~scriptingとの相互作用

~stylesheetは,[ `link$e 要素 / `style$e 要素 / `~xml-stylesheet$c 処理命令 / ~HTTP `Link$h ~header ]その他の何らかの仕組みにより追加され得るが、いずれにせよ, `~stylesheet準備済み~flag@ — 初期~時は ~OFF — を有する。 ◎ Style sheets, whether added by a link element, a style element, an <?xml-stylesheet?> PI, an HTTP `Link` header, or some other mechanism, have a style sheet ready flag, which is initially unset.

~stylesheet %S の`~stylesheet準備済み~flag$は、 %S を適用する用意が整った時点で, ~ONにされ~MUST。 %S の~style規則は、次に与える時点から~scriptに可用にされ~MUST:

  • %S が他の資源を参照してない場合、`即時に$。 (例: %S は `style$e 要素による埋め込みの~stylesheetであって `import^at 規則を含んでいないなど。)
  • 他の場合、`~event-loop$が その`描画を更新する$ 段に達して以降。
◎ When a style sheet is ready to be applied, its style sheet ready flag must be set. 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構文解析器$ ] %構文解析器 の`文書$ %文書 の文脈~下にある~stylesheet %S は、次がすべて満たされる間は `~scriptを阻んで@ いるとされる: ◎ A style sheet in the context of the Document of an HTML parser or XML parser is said to be a style sheet that is blocking scripts if all of the following conditions occur:

  • %S を与えている要素 %要素 は、 %構文解析器 により作成された ◎ The element was created by that Document's parser.
  • 次のいずれかが満たされる:

    • %要素 は `style$e 要素である
    • %要素 は、次をいずれも満たす `link$e 要素である:

    ◎ The element is either a style element or a link element that was an external resource link that contributes to the styling processing model when the element was created by the parser. ◎ If the element is a link element, it's media attribute's value matches the environment.
  • %構文解析器 が %要素 を作成した時点で、 %S は可能化された ◎ The element's style sheet was enabled when the element was created by the parser.
  • %要素 の`~stylesheet準備済み~flag$ ~EQ ~OFF ◎ The element's style sheet ready flag is not yet set.
  • `~event-loop$の 最初の段 に最後に達した時点で[ %要素 の`根$ ~EQ %文書 ]であった ◎ The last time the event loop reached step 1, the element's root was that Document.
  • ~UAは %S をまだ~give-upしていない — ~UAは、~stylesheetをいつでも~give-upして~MAY。 【“~give-up” とは、下の注記から,~stylesheetの処理を放棄するのではなく、後回しにすることを意味するようだ。】 ◎ The user agent hasn't given up on that particular style sheet yet. A user agent may give up on a style sheet at any time.

注記: ~stylesheetの読込-を終える前に~give-upすることは、それが最終的に読込まれるとするなら,~scriptが不正な情報で演算する結果になることを意味する。 例えば、その~stylesheetは,ある要素の色を緑に設定するとする。 結果の~styleを検分する~scriptは,~stylesheetが読込まれる前に実行され,その要素は黒(あるいは何か既定の色)であると見出すことになる結果、道を誤るかもしれない(頁の他所に用いる色を緑でなく黒にしてしまうなど)。 実装者は、~scriptが不正な情報を利用することと,低速な~network要請が終わるまで何もしないことによる処理能への影響0との兼ね合いを測る必要がある。 ◎ 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.

次のいずれかが満たされる間は、`文書$ %文書 には, `~scriptを阻んでいる~stylesheetは在る@ とされる:

  • ある~stylesheetが %文書 の文脈~下にあって,`~scriptを阻んで$いる。
  • [ %文書 が`属する閲覧文脈$ %B ~NEQ ε ]~AND[ %B の`親~閲覧文脈$ %親 ~NEQ ε ]~AND[ %親 にて`作動中の文書$には,`~scriptを阻んでいる~stylesheetは在る$ ]
◎ A Document has a style sheet that is blocking scripts if there is either a style sheet that is blocking scripts in the context of that Document, or if that Document has a browsing context that has a parent browsing context, and the active document of that parent browsing context itself has a style sheet that is blocking scripts.

`~scriptを阻んでいる~stylesheetは無い@ は、 `~scriptを阻んでいる~stylesheetは在る$ の否定である。 ◎ A Document has no style sheet that is blocking scripts if it does not have a style sheet that is blocking scripts as defined in the previous paragraph.