headèŠçŽ htmlèŠçŽ å
ã®æåã®èŠçŽ ãšããŠãiframe srcdocææžã§ããããã¿ã€ãã«æ
å ±ãããäžäœãããã³ã«ããå©çšå¯èœãªå Žåã1ã€ããå€ããªãtitleèŠçŽ ããã³1ã€ããå€ããªãbaseèŠçŽ ã§ããã0å以äžã®ã¡ã¿ããŒã¿ã³ã³ãã³ããtitleèŠçŽ ãååšããã€1ã€ããå€ããªãbaseèŠçŽ ã§ããã1ã€ä»¥äžã®ã¡ã¿ããŒã¿ã³ã³ãã³ããheadèŠçŽ å
ã®æåã®æãèŠçŽ ã§ããå ŽåãheadèŠçŽ ã®éå§ã¿ã°ã¯çç¥ããŠããããheadèŠçŽ ã®çŽåãç©ºçœæåãŸãã¯ã³ã¡ã³ãã§ãªãå ŽåãheadèŠçŽ ã®çµäºã¿ã°ã¯çç¥ããŠããããinterface HTMLHeadElement : HTMLElement {};
headèŠçŽ ã¯ãDocumentã«é¢ããã¡ã¿ããŒã¿ã®éãŸãã衚ãã
headèŠçŽ ã§ã®ã¡ã¿ããŒã¿ã®éãŸãã¯ã倧ãããããããªãããå°ãããããããªããããã¯éåžžã«ç°¡æœãªäŸã§ããïŒ
<!doctype html> <html> <head> <title>A document with a short head</title> </head> <body> ...
ããã¯ãã倧ããªäŸã§ããïŒ
<!DOCTYPE HTML> <HTML> <HEAD> <META CHARSET="UTF-8"> <BASE HREF="http://www.example.com/"> <TITLE>An application with a long head</TITLE> <LINK REL="STYLESHEET" HREF="default.css"> <LINK REL="STYLESHEET ALTERNATE" HREF="big.css" TITLE="Big Text"> <SCRIPT SRC="support.js"></SCRIPT> <META NAME="APPLICATION-NAME" CONTENT="Long headed application"> </HEAD> <BODY> ...
titleèŠçŽ ã¯ãã»ãšãã©ã®ç¶æ³ã§å¿
é ã®åã§ããããäžäœãããã³ã«ãã¿ã€ãã«æ
å ±ãæäŸããå Žåãããšãã°HTMLãé»åã¡ãŒã«ã®ãªãŒãµãªã³ã°åœ¢åŒãšããŠäœ¿çšããããšãã®é»åã¡ãŒã«ã®ä»¶åã«ãããŠãtitleèŠçŽ ã¯çç¥ã§ããã
titleèŠçŽ titleèŠçŽ ãå«ãŸãªãheadèŠçŽ å
ãinterface HTMLTitleElement : HTMLElement {
attribute DOMString text;
};
titleèŠçŽ ã¯ãææžã®ã¿ã€ãã«ãŸãã¯ååã衚ããããšãã°ããŠãŒã¶ãŒã®å±¥æŽãããã¯ããŒã¯ãŸãã¯æ€çŽ¢çµæãªã©ã§ãæèãç¡èŠããŠäœ¿çšãããå Žåã§ããèè
ã¯ææžãèå¥ããã¿ã€ãã«ã䜿çšãã¹ãã§ãããæèããåãåºãããšãã«æåã®èŠåºããç¬ç«ããå¿
èŠã¯ãªãã®ã§ãææžã®ã¿ã€ãã«ã¯å€ãã®å Žåãæåã®èŠåºããšã¯ç°ãªãã
ææžããšã«è€æ°ã®titleèŠçŽ ãååšããŠã¯ãªããªãã
ã¿ã€ãã«ããªãããšãåççãªDocumentã®å ŽåãtitleèŠçŽ ã¯ããããå¿
èŠãšãããªãããã®èŠçŽ ãå¿
èŠãšãããå Žåã®èª¬æã«ã€ããŠã¯ãheadèŠçŽ ã®ã³ã³ãã³ãã¢ãã«ãåç
§ã®ããšã
text [ = value ]TextããŒãã§ãªãåããŒããç¡èŠããŠãèŠçŽ ã®å
容ãè¿ãã
äžããããå€ãæã€èŠçŽ ã®åã眮æããããã«ãèšå®ã§ããã
The IDL attribute text must return a
concatenation of the contents of all the Text nodes that are children of the
title element (ignoring any other nodes such as comments or elements), in tree order.
On setting, it must act the same way as the textContent IDL attribute.
ãããã®åãããŒãžäžã§äœ¿çšããããããããªããããã¬ãã«ã®èŠåºããšå¯Ÿç §çã«ãé©åãªã¿ã€ãã«ã®ããã€ãã®äŸã次ã«ç€ºãã
<title>Introduction to The Mating Rituals of Bees</title>
...
<h1>Introduction</h1>
<p>This companion guide to the highly successful
<cite>Introduction to Medieval Bee-Keeping</cite> book is...
次ã®ããŒãžã¯ãåããµã€ãã®äžéšã§ãããããããªããæåã®èŠåºãããèªè ãã©ã®ãããªæèãç¥ã£ãŠããããããã£ãŠãã³ã¹ããµã«ãµãã¯ã«ãã§ãããã©ãããç¥ããããšæããªãã ããããšãåæãšãã€ã€ãã¿ã€ãã«ãæç¢ºã«äž»é¡ã説æããæ¹æ³ã«æ³šæããïŒ
<title>Dances used during bee mating rituals</title>
...
<h1>The Dances</h1>
ææžã®ã¿ã€ãã«ãšããŠäœ¿çšããæååã¯ãdocument.titleIDL屿§ã«ãã£ãŠäžããããã
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.
baseèŠçŽ baseèŠçŽ ãå«ãŸãªãheadèŠçŽ å
ãhref â ææžåºåºURLtarget â ãã€ããŒãªã³ã¯ããã²ãŒã·ã§ã³ããã³ãã©ãŒã éä¿¡ã«å¯Ÿãããã©ãŠãžã³ã°ã³ã³ããã¹ãinterface HTMLBaseElement : HTMLElement {
attribute DOMString href;
attribute DOMString target;
};
baseèŠçŽ ã¯ãèè
ã«çžå¯ŸURLã解決ããç®çã§ææžã®åºåºURLãæå®ãããã³æ¬¡ã«ç¶ããã€ããŒãªã³ã¯ã®ããã«ããã©ã«ãã§ãã©ãŠãžã³ã°ã³ã³ããã¹ãã®ååã®æå®ãèš±å¯ããããã®èŠçŽ ã¯ããã®æ
å ±ãè¶
ããä»»æã®ã³ã³ãã³ãã衚ããã®ã§ãªãã
ææžããšã«è€æ°ã®baseèŠçŽ ãååšããŠã¯ãªããªãã
baseèŠçŽ ã¯ãhref屿§ããŸãã¯target屿§ã®ããããããããã¯ãã®äž¡æ¹ãæããªããã°ãªããªãã
hrefã³ã³ãã³ã屿§ãæå®ãããå Žåãæœåšçã«ã¹ããŒã¹ã§å²ãŸãã劥åœãªURLã§ãªããã°ãªããªãã
href屿§ãæã€å ŽåãbaseèŠçŽ ã¯ãhtmlèŠçŽ ãé€ããŠïŒmanifest屿§ã¯baseèŠçŽ ã«åœ±é¿ãããªãïŒãURLãååŸããããå®çŸ©ããã屿§ãæã€ããªãŒå
ã®ä»ã®èŠçŽ ã®åã«æ¥ãªããã°ãªããªãã
target屿§ãæå®ãããå ŽåãDocumentã§ãã€ããŒãªã³ã¯ããã©ãŒã ãããã²ãŒã·ã§ã³ãåŒãèµ·ããéã«ãã©ã®ãã©ãŠãžã³ã°ã³ã³ããã¹ããããã©ã«ããšããŠäœ¿çšããããæå®ãã劥åœãªãã©ãŠãžã³ã°ã³ã³ããã¹ãã®ååãŸãã¯ããŒã¯ãŒããå«ãŸãªããã°ãªããªãã
target屿§ãæã€å ŽåãbaseèŠçŽ ã¯ããã€ããŒãªã³ã¯ã衚ãããªãŒå
ã®èŠçŽ ã®åã«æ¥ãªããã°ãªããªãã
If there are multiple base elements with target attributes, all but the first are ignored.
A base element that is the first base element with an href content attribute in a particular Document has a
frozen base URL. The frozen base URL must be set, synchronously, whenever any of the following situations occur:
base element becomes the first base element in tree
order with an href content attribute in its
Document.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.To set the frozen base URL, resolve
the value of the element's href content attribute relative to
the Document's fallback base URL; if this is successful, set the
frozen base URL to the resulting absolute URL, otherwise, set the
frozen base URL to the fallback base URL.
The href IDL attribute, on getting, must return
the result of running the following algorithm:
If the base element has no href content
attribute, then return the document base URL and abort these steps.
fallback base urlãDocumentã®ãã©ãŒã«ããã¯åºåºURLã«ããã
Let url be the value of the href
attribute of the base element.
Resolve url relative to fallback base url (thus, the base href attribute isn't affected by xml:base attributes or base elements).
If the previous step was successful, return the resulting absolute URL and abort these steps.
Otherwise, return the empty string.
The href IDL attribute, on setting, must set the href content attribute to the given new value.
The target IDL attribute must
reflect the content attribute of the same name.
ãã®äŸã«ãããŠãbaseèŠçŽ ã¯ææžã®åºåºURLãèšå®ããããã«äœ¿çšãããïŒ
<!DOCTYPE html>
<html>
<head>
<title>This is an example for the <base> element</title>
<base href="http://www.example.com/news/index.html">
</head>
<body>
<p>Visit the <a href="archives.html">archives</a>.</p>
</body>
</html>
äžèšã®äŸã«ãããŠããªã³ã¯ã¯"http://www.example.com/news/archives.html"ãžã®ãªã³ã¯ãšãªãã
linkèŠçŽ headèŠçŽ ã®åã§ããnoscriptèŠçŽ å
ãhref â ãã€ããŒãªã³ã¯ã®ã¢ãã¬ã¹crossorigin â èŠçŽ ãcrossoriginèŠæ±ãåŠçããæ¹æ³rel â ãã€ããŒãªã³ã¯ãšå®å
ã®ãªãœãŒã¹ãå«ãææžã®é¢ä¿media â åãå
¥ãå¯èœãªã¡ãã£ã¢hreflang â ãªã³ã¯ããããªãœãŒã¹ã®èšèªtype â åç
§ããããªãœãŒã¹ã¿ã€ãã®ãã³ãsizes â ã¢ã€ã³ã³ã®ãµã€ãºïŒrel="icon"ã«å¯ŸããïŒtitle屿§ã¯ãã®èŠçŽ ã§ç¹å¥ãªã»ãã³ãã£ãã¯ãæã€ïŒãªã³ã¯ã®ã¿ã€ãã«ã代æ¿ã¹ã¿ã€ã«ã·ãŒãèšå®åãlink ïŒããã©ã«ã - èšå®ããªãïŒãaria-*屿§ãroleå€ã«å¯Ÿã㊠interface HTMLLinkElement : HTMLElement {
attribute boolean disabled;
attribute DOMString href;
attribute DOMString crossOrigin;
attribute DOMString rel;
attribute DOMString rev;
readonly attribute DOMTokenList relList;
attribute DOMString media;
attribute DOMString hreflang;
attribute DOMString type;
[PutForwards=value] readonly attribute DOMSettableTokenList sizes;
};
HTMLLinkElement implements LinkStyle;
linkèŠçŽ ã¯ãèè
ãææžãä»ã®ãªãœãŒã¹ãšãªã³ã¯ããã®ãå¯èœã«ããã
ãªã³ã¯ã®å®å
ã¯href屿§ã«ãã£ãŠäžããããããã¯ååšããªããã°ãªãããæœåšçã«ã¹ããŒã¹ã§å²ãŸãã劥åœãªç©ºã§ãªãURLãå«ãŸãªããã°ãªããªããIf the href attribute is absent, then the element does not define a link.
linkèŠçŽ ã¯rel屿§ãæããªããã°ãªããªãã
rel屿§ã䜿çšãããå Žåããã®èŠçŽ ã¯headèŠçŽ ã«å¶éãããã
ïŒé¢ä¿ãïŒç€ºããããªã³ã¯ã®çš®é¡ã¯rel屿§å€ã«ãã£ãŠäžããããååšããå Žåãã¹ããŒã¹ã§åºåãããããŒã¯ã³ã®éåã§ããå€ãæããªããã°ãªããªããèš±å¯ãããããŒã¯ãŒããšãã®æå³ã¯ãåŸã®ç¯ã§å®çŸ©ããããIf the rel attribute is absent, has no keywords, or if none of the keywords used are allowed according to the definitions in this specification, then the element does not create any links.
å€éšãªãœãŒã¹ãžã®ãªã³ã¯ãšãã€ããŒãªã³ã¯ãšããã2ã€ã®ãªã³ã¯ã«ããŽãªãlinkèŠçŽ ãçšããŠäœæã§ããããªã³ã¯ã¿ã€ãã®ç¯ã§ã¯ããããªã³ã¯ã¿ã€ããå€éšãªãœãŒã¹ãŸãã¯ãã€ããŒãªã³ã¯ã§ãããã©ãããå®çŸ©ããã1ã€ã®linkèŠçŽ ã¯ãè€æ°ã®ãªã³ã¯ïŒäžéšã¯å€éšãªãœãŒã¹ãžã®ãªã³ã¯ããããããäžéšã¯ãã€ããŒãªã³ã¯ã§ãããããããªãïŒãäœæã§ãããæ£ç¢ºã«ã¯ãã©ã®ãªã³ã¯ãã©ãã ãäœæããããã¯ãrel屿§ã§äžããããããŒã¯ãŒãã«å¿ããŠç°ãªãããŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ãèŠçŽ ãããã®åºæºã§ã¯ãªãããªã³ã¯ãããã®åºæºã§ãªã³ã¯ãåŠçããªããã°ãªããªãã
linkèŠçŽ ã«å¯ŸããŠäœæãããåãªã³ã¯ã¯å¥ã
ã«åŠçããããããšãã°ãrel="stylesheet"ããã€2ã€ã®linkèŠçŽ ãååšããå Žåããããã¯åå¥ã®å€éšãªãœãŒã¹ãšããŠæ°ããããã³ãããããç¬ç«ã«ç¬èªã®å±æ§ã«ãã£ãŠåœ±é¿ããããåæ§ã«ãåäžã®linkèŠçŽ ãå€next stylesheetã䌎ãrel屿§ãæã€å Žåãããã¯ãã€ããŒãªã³ã¯ïŒnextããŒã¯ãŒããžã®ïŒããã³å€éšãªãœãŒã¹ãªã³ã¯ïŒstylesheetããŒã¯ãŒããžã®ïŒã®äž¡æ¹ãäœæãããããã¯ããããã«ïŒmediaãŸãã¯titleã®ãããªïŒä»ã®å±æ§ã®åœ±é¿ãåããã
ããšãã°ã次ã®linkèŠçŽ ã¯ãïŒåãããŒãžãžïŒ2ã€ã®ãã€ããŒãªã³ã¯ãäœæããã
<link rel="author license" href="/about">
ãã®èŠçŽ ã«ãã£ãŠäœæããã2ã€ã®ãªã³ã¯ã¯ã1ã€ã¯å¯Ÿè±¡ããŒãžãçŸåšã®ããŒãžã®èè ã«é¢ããæ å ±ãæã€ã»ãã³ãã£ãã¯ã§ããã1ã€ã¯çŸåšã®ããŒãžãæäŸãããŠããå éšã§ã©ã€ã»ã³ã¹ã«é¢ããæ å ±ã察象ããŒãžãæã€ã»ãã³ãã£ãã¯ã§ããã
crossorigin屿§ã¯CORSèšå®å±æ§ã§ãããããã¯ãå€éšãªãœãŒã¹ãªã³ã¯ã§ã®äœ¿çšãæå³ãããã
å€éšãªãœãŒã¹ãžã®ãªã³ã¯ã«å¯Ÿããæ£ç¢ºãªæ¯ãèãã¯ãé¢é£ãããªã³ã¯åã«å¯ŸããŠå®çŸ©ãããããã«ãæ£ç¢ºãªé¢ä¿ã«äŸåãããäžéšã®å±æ§ã¯ãïŒä»¥äžã«å®çŸ©ãããããã«ïŒå€éšãªãœãŒã¹ãé©çšããããã©ãããå¶åŸ¡ããã
For external resources that are represented in the DOM (for example, style sheets), the DOM representation must be made available (modulo cross-origin restrictions) even if the resource is not applied. To obtain the resource, the user agent must run the following steps:
If the href attribute's value is the empty string,
then abort these steps.
Resolve the URL given by the href attribute, relative to the element.
If the previous step fails, then abort these steps.
Do a potentially CORS-enabled fetch of the resulting absolute
URL, with the mode being the current state of the element's crossorigin content attribute, the origin
being the origin of the link element's Document, and the
default origin behaviour set to taint.
The resource obtained in this fashion can be either CORS-same-origin or CORS-cross-origin.
User agents may opt to only try to obtain such resources when they are needed, instead of pro-actively fetching all the external resources that are not applied.
The semantics of the protocol used (e.g. HTTP) must be followed when fetching external resources. (For example, redirects will be followed and 404 responses will cause the external resource to not be applied.)
Once the attempts to obtain the resource and its critical subresources are
complete, the user agent must, if the loads were successful, queue a task to
fire a simple event named load at the
link element, or, if the resource or one of its 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 a simple
event named error at the link element.
Non-network errors in processing the resource or its subresources (e.g. CSS parse errors, PNG
decoding errors) are not failures for the purposes of this paragraph.
The task source for these tasks is the DOM manipulation task source.
The element must delay the load event of the element's document until all the attempts to obtain the resource and its critical subresources are complete. (Resources that the user agent has not yet attempted to obtain, e.g. because it is waiting for the resource to be needed, do not delay the load event.)
Interactive user agents may provide users with a means to follow the hyperlinks created using the link element, somewhere
within their user interface. The exact interface is not defined by this specification, but it
could include the following information (obtained from the element's attributes, again as defined
below), in some form or another (possibly simplified), for each hyperlink created with each
link element in the document:
rel attribute)title
attribute).href
attribute).hreflang
attribute).media
attribute).User agents could also include other information, such as the type of the resource (as given by
the type attribute).
linkèŠçŽ ãšãšãã«äœæããããã€ããŒãªã³ã¯ããã³ãã®rel屿§ã¯ããŒãžå
šäœã«é©çšããããããã¯ãã³ã³ããã¹ããææžå
ã®ãªã³ã¯äœçœ®ã«ãã£ãŠäžãããããªã³ã¯åã瀺ããaããã³areaèŠçŽ ã®rel屿§ãšã¯å¯Ÿç
§çã§ããã
media屿§ã¯ããªãœãŒã¹ãé©çšãããã¡ãã£ã¢ã衚ããå€ã¯åŠ¥åœãªã¡ãã£ã¢ã¯ãšãªã§ãªããã°ãªããªãã
If the link is a hyperlink then the media
attribute is purely advisory, and describes for which media the document in question was
designed.
However, if the link is an external resource link, then the media attribute is prescriptive. The user agent must apply the
external resource when the media attribute's value
matches the environment and the other relevant conditions apply, and must not apply
it otherwise.
The external resource might have further restrictions defined within that limit
its applicability. For example, a CSS style sheet might have some @media
blocks. This specification does not override such further restrictions or requirements.
media屿§ãçç¥ãããå Žåãããã©ã«ãã§ã¯"all"ã§ãããããã©ã«ãã®ãªã³ã¯ã«ããããã¹ãŠã®ã¡ãã£ã¢ã«é©çšãããããšãæå³ããã
linkèŠçŽ ã®hreflang屿§ã¯ãaããã³areaèŠçŽ ã®hreflang屿§ãšåãã»ãã³ãã£ãã¯ãæã€ã
type屿§ã¯ããªã³ã¯ããããªãœãŒã¹ã®MIMEã¿ã€ããæäŸãããããã¯åãªãå©èšã§ãããå€ã¯åŠ¥åœãªMIMEã¿ã€ãã§ãªããã°ãªããªãã
å€éšãªãœãŒã¹ãžã®ãªã³ã¯ã«ã€ããŠããããããµããŒãããªããªãœãŒã¹ã®åååŸãåé¿ã§ããããã«ãtype屿§ã¯ãŠãŒã¶ãŒãšãŒãžã§ã³ããžã®ãã³ããšããŠäœ¿çšããããIf the attribute is present, then the user agent must assume that the resource is of the given type (even if that is not a valid MIME type, e.g. the empty string). If the attribute is omitted, but the external resource link type has a default type defined, then the user agent must assume that the resource is of that type. If the UA does not support the given MIME type for the given link relationship, then the UA should not obtain the resource; if the UA does support the given MIME type for the given link relationship, then the UA should obtain the resource at the appropriate time as specified for the external resource link's particular type. If the attribute is omitted, and the external resource link type does not have a default type defined, but the user agent would obtain the resource if the type was known and supported, then the user agent should obtain the resource under the assumption that it will be supported.
User agents must not consider the type attribute
authoritative â upon fetching the resource, user agents must not use the type attribute to determine its actual type. Only the actual type
(as defined in the next paragraph) is used to determine whether to apply the resource,
not the aforementioned assumed type.
If the external resource link type defines rules for processing the resource's Content-Type metadata, then those rules apply. Otherwise, if the resource is expected to be an image, user agents may apply the image sniffing rules, with the official type being the type determined from the resource's Content-Type metadata, and use the resulting sniffed type of the resource as if it was the actual type. Otherwise, if neither of these conditions apply or if the user agent opts not to apply the image sniffing rules, then the user agent must use the resource's Content-Type metadata to determine the type of the resource. If there is no type metadata, but the external resource link type has a default type defined, then the user agent must assume that the resource is of that type.
The stylesheet link type defines rules for
processing the resource's Content-Type metadata.
Once the user agent has established the type of the resource, the user agent must apply the resource if it is of a supported type and the other relevant conditions apply, and must ignore the resource otherwise.
If a document contains style sheet links labeled as follows:
<link rel="stylesheet" href="A" type="text/plain"> <link rel="stylesheet" href="B" type="text/css"> <link rel="stylesheet" href="C">
...then a compliant UA that supported only CSS style sheets would fetch the B and C files, and
skip the A file (since text/plain is not the MIME type for CSS style
sheets).
For files B and C, it would then check the actual types returned by the server. For those that
are sent as text/css, it would apply the styles, but for those labeled as
text/plain, or any other type, it would not.
If one of the two files was returned without a Content-Type metadata, or with a
syntactically incorrect type like Content-Type: "null", then the
default type for stylesheet links would kick in. Since that
default type is text/css, the style sheet would nonetheless be
applied.
title屿§ã¯ããªã³ã¯ã®ã¿ã€ãã«ãäžãããäžã€ã®äŸå€ãé€ããŠãããã¯çŽç²ã«å©èšçã§ãããå€ã¯ããã¹ãã§ãããäŸå€ã¯ãtitle屿§ã代æ¿ã¹ã¿ã€ã«ã·ãŒãã®ã»ãããå®çŸ©ããã¹ã¿ã€ã«ã·ãŒãã®ãªã³ã¯ã«å¯Ÿãããã®ã§ããã
linkèŠçŽ ã®title屿§ã¯ãã¿ã€ãã«ããããªããªã³ã¯ã芪èŠçŽ ã®ã¿ã€ãã«ãç¶æ¿ããªãç¹ã§ãä»ã®ã»ãšãã©ã®èŠçŽ ã«å±ããã°ããŒãã«title屿§ãšã¯ç°ãªããããã¯åã«ã¿ã€ãã«ãæããªãã
sizes屿§ã¯ãiconãªã³ã¯ã¿ã€ããšãšãã«äœ¿çšãããã屿§ã¯ãiconã®ããŒã¯ãŒããæå®ããrel屿§ãæããªãlinkèŠçŽ ãæå®ããŠã¯ãªããªãã
The activation behavior of link elements that create hyperlinks is to run the following steps:
If the link element's Document is not fully active,
then abort these steps.
Follow the hyperlink created by the
link element.
HTTP Link: headers, if supported, must be assumed to come before
any links in the document, in the order that they were given in the HTTP message. These headers
are to be processed according to the rules given in the relevant specifications. [HTTP] [WEBLINK]
Registration of relation types in HTTP Link: headers is distinct from HTML link types, and thus their semantics can be different from same-named HTML types.
The IDL attributes href, rel, rev, media,
hreflang, type, and sizes each must reflect the respective
content attributes of the same name.
The crossOrigin IDL attribute must
reflect the crossorigin content attribute,
limited to only known values.
The IDL attribute relList must reflect the rel content attribute.
IDL屿§disabledã¯ãã¹ã¿ã€ã«ã·ãŒãã®ãªã³ã¯ã«ã®ã¿é©çšãããlinkèŠçŽ ãã¹ã¿ã€ã«ã·ãŒãã®ãªã³ã¯ãå®çŸ©ããå Žåãdisabled屿§ã¯ã代æ¿ã¹ã¿ã€ã«ã·ãŒãDOMãžå®çŸ©ãããããã«æ¯ãèããä»ã®ãã¹ãŠã®linkèŠçŽ ã«å¯ŸããŠãããã¯åžžã«falseãè¿ããäœãèšå®ããªãã
LinkStyleã€ã³ã¿ãŒãã§ãŒã¹ã¯ãŸãããã®èŠçŽ ã§å®è£
ããããã¹ã¿ã€ãªã³ã°åŠçã¢ãã«ãæ¹æ³ãå®çŸ©ããã[CSSOM]
ããã§ãlinkèŠçŽ ã®ã»ããã¯ãã¹ã¿ã€ã«ã·ãŒããæäŸããïŒ
<!-- a persistent style sheet --> <link rel="stylesheet" href="default.css"> <!-- the preferred alternate style sheet --> <link rel="stylesheet" href="green.css" title="Green styles"> <!-- some alternate style sheets --> <link rel="alternate stylesheet" href="contrast.css" title="High contrast"> <link rel="alternate stylesheet" href="big.css" title="Big fonts"> <link rel="alternate stylesheet" href="wide.css" title="Wide screen">
次ã®äŸã¯ãå¥ã®åœ¢åŒã䜿çšãããä»èšèªåããä»ã®ã¡ãã£ã¢ã®ããã«æå³ãããŠããããŒãžã®ããŒãžã§ã³ãã©ã®ããã«æå®ã§ãããã瀺ãïŒ
<link rel=alternate href="/en/html" hreflang=en type=text/html title="English HTML"> <link rel=alternate href="/fr/html" hreflang=fr type=text/html title="French HTML"> <link rel=alternate href="/en/html/print" hreflang=en type=text/html media=print title="English HTML (for printing)"> <link rel=alternate href="/fr/html/print" hreflang=fr type=text/html media=print title="French HTML (for printing)"> <link rel=alternate href="/en/pdf" hreflang=en type=application/pdf title="English PDF"> <link rel=alternate href="/fr/pdf" hreflang=fr type=application/pdf title="French PDF">
metaèŠçŽ charset屿§ãååšããå ŽåããŸãã¯èŠçŽ ã®http-equivã®å±æ§ããšã³ã³ãŒã宣èšç¶æ
ã«ããå ŽåïŒheadèŠçŽ å
ãhttp-equiv屿§ãååšãããããšã³ã³ãŒã宣èšç¶æ
ã§ãªãå ŽåïŒheadèŠçŽ å
ãhttp-equiv屿§ãååšãããããšã³ã³ãŒã宣èšç¶æ
ã§ãªãå ŽåïŒheadèŠçŽ ã®åã§ããnoscriptèŠçŽ å
ãname屿§ãååšããå ŽåïŒã¡ã¿ããŒã¿ã³ã³ãã³ããæåŸ
ãããå Žæãname â ã¡ã¿ããŒã¿åhttp-equiv â ãã©ã°ããã£ã¬ã¯ãã£ãcontent â èŠçŽ ã®å€charset â æåãšã³ã³ãŒãã£ã³ã°å®£èšinterface HTMLMetaElement : HTMLElement {
attribute DOMString name;
attribute DOMString httpEquiv;
attribute DOMString content;
};
metaèŠçŽ ã¯ãtitleãbaseãlinkãstyleãscriptèŠçŽ ãçšããŠè¡šçŸã§ããªãæ§ã
ãªçš®é¡ã®ã¡ã¿ããŒã¿ã衚ãã
metaèŠçŽ ã¯ãname屿§ããã€ææžã¬ãã«ã®ã¡ã¿ããŒã¿ãhttp-equiv屿§ãæã€ãã©ã°ãã»ãã£ã¬ã¯ãã£ããããã³charset屿§ããã€HTMLææžãæåå圢åŒã«ã·ãªã¢ã©ã€ãºãããïŒããšãã°ããããã¯ãŒã¯äžã®äŒéããŸãã¯ãã£ã¹ã¯ã¹ãã¬ãŒãžïŒå Žåããã¡ã€ã«ã®æåãšã³ã³ãŒãã£ã³ã°å®£èšã衚ãããšãã§ããã
nameãhttp-equivãããã³charset屿§ã®ãã¡ã®1ã€ãæ£ç¢ºã«æå®ããªããã°ãªããªãã
nameãŸãã¯http-equivã®ãããããæå®ãããå Žåãcontent屿§ãæå®ããªããã°ãªããªããããã§ãªããã°ãçç¥ãããªããã°ãªããªãã
charset屿§ã¯ãææžã§äœ¿çšãããæåãšã³ã³ãŒãã£ã³ã°ãæå®ãããããã¯ãæåãšã³ã³ãŒãã£ã³ã°å®£èšã§ããã屿§ãXMLææžå
ã«ååšããå Žåããã®å€ã¯ãæåå"UTF-8"ãšASCII倧æåã»å°æåäžåºå¥ã§äžèŽããªããã°ãªããªãïŒãããã£ãŠãææžã¯ããšã³ã³ãŒãã£ã³ã°ãšããŠUTF-8ã䜿çšãããã匷å¶ãããïŒã
metaèŠçŽ äžã®charset屿§ã¯ãXMLææžã§ã¯å¹æããªããåã«XHTMLããã®ç§»è¡ã容æã«ããããã«èš±å¯ãããã
ææžããšã«charset屿§ããã€è€æ°ã®metaèŠçŽ ããã£ãŠã¯ãªããªãã
content屿§ã¯ãææžã®ã¡ã¿ããŒã¿ãŸãã¯èŠçŽ ããããã®ç®çã®ããã«äœ¿çšãããå Žåã®ãã©ã°ããã£ã¬ã¯ãã£ãã®å€ãäžããããã®ä»æ§ã®åŸç¶ã®ç¯ã§èª¬æãããããã«ãèš±å¯ãããå€ã¯ãæ£ç¢ºãªæèã«äŸåããã
metaèŠçŽ ãname屿§ãæã€å Žåãææžã®ã¡ã¿ããŒã¿ãèšå®ãããææžã®ã¡ã¿ããŒã¿ã¯ãååãšå€ã®ãã¢ã®èгç¹ãã衚ããããmetaèŠçŽ ã®name屿§ãååãäžããåãèŠçŽ ã®content屿§ãå€ãäžãããååã¯ã¡ã¿ããŒã¿ã®ã©ã®åŽé¢ãèšå®ããããæå®ããã劥åœãªååãšãã®å€ã®æå³ã¯ã次ã®ç¯ã§èª¬æãããmetaèŠçŽ ãcontent屿§ãæããªãå Žåãã¡ã¿ããŒã¿ã®ååãšå€ã®ãã¢ã®å€éšåã¯ã空æååã§ããã
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.
ãã®ä»æ§ã¯ãmetaèŠçŽ ã®name屿§ã®ååãå®çŸ©ããã
Names are case-insensitive, and must be compared in an ASCII case-insensitive manner.
application-nameå€ã¯ãããŒãžã衚ããŠã§ãã¢ããªã±ãŒã·ã§ã³ã®ååãäžããçãèªç±åœ¢åŒã®æååã§ãªããã°ãªããªããããŒãžããŠã§ãã¢ããªã±ãŒã·ã§ã³ã§ãªãå Žåãapplication-nameã¡ã¿ããŒã¿åã䜿çšããŠã¯ãªããªããããããã®ååã®èšèªãæå®ãã屿§ã䜿çšããããšã§ããŠã§ãã¢ããªã±ãŒã·ã§ã³åã®ç¿»èš³ã¯äžããããŠãããã
äžããããèšèªããã¡ããã€ææžããšã«å€application-nameãèšå®ããname屿§ããã€è€æ°ã®metaèŠçŽ ãååšããŠã¯ãªããªãã
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.
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:
Let languages be the list of languages.
Let default language be the language of the
Document's root 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 is languages, append it to languages.
Let winning language be the first language in languages for which there is a meta element in the
Document that has its name attribute set to
the value application-name and whose
language is the language in question.
If none of the languages have such a meta element, then abort these steps;
there's no given application name.
Return the value of the content attribute of the
first meta element in the Document in tree order that
has its name attribute set to the value application-name and whose language is winning language.
authorå€ã¯ãããŒãžèè ã®ãã¡ã®äžäººã®ååãäžãããèªç±åœ¢åŒã®æååã§ãªããã°ãªããªãã
descriptionå€ã¯ãããŒãžã説æããèªç±åœ¢åŒã®æååã§ãªããã°ãªããªããããšãã°æ€çŽ¢ãšã³ãžã³å
ãªã©ãå€ã¯ããŒãžã®ãã£ã¬ã¯ããªã§äœ¿çšããããã«é©åãªãã®ã§ãªããã°ãªããªããææžããšã«å€descriptionãèšå®ããname屿§ãæã€è€æ°ã®metaèŠçŽ ããã£ãŠã¯ãªããªãã
generatorå€ã¯ãææžãçæããããã«äœ¿çšããããœãããŠã§ã¢ããã±ãŒãžã®1ã€ãèå¥ããèªç±åœ¢åŒã®æååã§ãªããã°ãªããªãããã®å€ã¯ãããšãã°ããŒã¯ã¢ãããããã¹ããšãã£ã¿ã§ãŠãŒã¶ãŒã«ãã£ãŠèšè¿°ãããããŒãžã®ããã«ãããŒã¯ã¢ããããœãããŠã§ã¢ã«ãã£ãŠçæãããªãããŒãžã§äœ¿çšããŠã¯ãªããªãã
"Frontweaver"ãšåŒã°ããããŒã«ã¯ãããŒãžçæã®ããã«äœ¿çšãããããŒã«ãšããŠèªåèªèº«ãèå¥ããããã«ãããŒãžã®headèŠçŽ å
ã«ãã®åºåã§å«ããããããªãïŒ
<meta name=generator content="Frontweaver 8.2">
keywordså€ã¯ããããããããŒãžã«é¢é£ããããŒã¯ãŒãã§ãããã³ã³ãåºåãããŒã¯ã³ã®éåã§ãªããã°ãªããªãã
ã€ã®ãªã¹ã®é«ééè·¯äžã®æžäœã«é¢ãããã®ããŒãžã¯ããŠãŒã¶ãŒãããŒãžãæ€çŽ¢ããããã«äœ¿çšãããããããªãããŒã¯ãŒããæå®ããmetaèŠçŽ ã䜿çšããŠããïŒ
<!DOCTYPE HTML> <html> <head> <title>Typefaces on UK motorways</title> <meta name="keywords" content="british,type face,font,fonts,highway,highways"> </head> <body> ...
å€ãã®æ€çŽ¢ãšã³ãžã³ã¯ããã®æ©èœãæŽå²çã«åœãŠã«ãªãããããã«ã¯ãŠãŒã¶ãŒã«ãšã£ãŠæçã§ãªãææ®µããããããæ€çŽ¢ãšã³ãžã³ã¹ãã ãšããŠèª€è§£ãæãæ¹æ³ã§äœ¿çšãããŠããã®ã§ããã®ãããªããŒã¯ãŒããèæ ®ããªãã
To obtain the list of keywords that the author has specified as applicable to the page, the user agent must run the following steps:
Let keywords be an empty list.
For each meta element with a name
attribute and a content attribute and whose name attribute's value is keywords, run the following substeps:
Split the value of the element's content attribute on commas.
Add the resulting tokens, if any, to keywords.
Remove any duplicates from keywords.
Return keywords. This is the list of keywords that the author has specified as applicable to the page.
User agents should not use this information when there is insufficient confidence in the reliability of the value.
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.
ã¡ã¿ããŒã¿åã®å®çŸ©æžã¿ã»ããã«å¯Ÿããæ¡åŒµã¯ãWHATWG Wiki MetaExtensions pageã«ç»é²ãããŠãããããããªãã[WHATWGWIKI]
åã®è¿œå ã¯ããã€ã§ãWHATWG Wiki MetaExtensions pageãç·šéããããšã§èª°ããèªç±ã«ã§ããããããã®æ°ããååã¯ãæ¬¡ã®æ å ±ãæå®ããªããã°ãªããªãïŒ
å®éã®ååãå®çŸ©ãããŠãããååã¯ãä»ã®å®çŸ©æžã¿ã®ååãšçŽãããããã®ã§ããã¹ãã§ãªãïŒããšãã°ã倧æåãšå°æåã ããç°ãªãïŒã
ã¡ã¿ããŒã¿åã®æå³ã¯ã©ã®ãããªãã®ãã®çãéæšæºã®èª¬æã¯ããã®å€ãèŠæ±ãã圢åŒãå«ãã
å šãåãåŠçèŠæ±ãæã€ä»ã®ååã®ãªã¹ããèè ã¯ãå矩èªã§ãããšå®çŸ©ãããååã䜿ãã¹ãã§ã¯ãªããå矩èªã¯ãŠãŒã¶ãŒãšãŒãžã§ã³ããã¬ã¬ã·ãŒã³ã³ãã³ãããµããŒãããããã ãã®ãã®ã§ããã誰ããå®éã«äœ¿çšãããŠãªãå矩èªãåé€ã§ãããã¬ã¬ã·ãŒã³ã³ãã³ããšã®äºææ§ã®ããã«å矩èªãšããŠåŠçããå¿ èŠãããååã®ã¿ãããã®æ¹æ³ã§ç»é²ãããŠããã®ã§ããã
以äžã®ãã¡ã®1ã€ããšãïŒ
ã¡ã¿ããŒã¿åãæ¢åã®å€ãšãšãã«åé·ã§ããããšã倿ããå Žåãåé€ãããæ¢åã®å€ã®å矩èªãšããŠãªã¹ããããŠããã¹ãã§ããã
ã¡ã¿ããŒã¿åãã䜿çšãããŸãã¯æå®ããããšãªãäžæä»¥äžã®æé"proposed"ïŒææ¡ïŒç¶æ ã§ç»é²ãããŠããå Žåãã¬ãžã¹ããªããåé€ãããããšãããã
ã¡ã¿ããŒã¿åã"proposed"ïŒææ¡ïŒç¶æ ã§è¿œå ãããæ¢åã®å€ãšãšãã«åé·ã§ããããšã倿ããŠããå Žåãæ¢åã®å€ã®å矩èªãšããŠåé€ããããªã¹ããããŠããã¹ãã§ãããã¡ã¿ããŒã¿åã¯"proposed"ïŒææ¡ïŒç¶æ ã§è¿œå ãããæå®³ã ãšå€æããŠããå Žåã"discontinued"ïŒäžæ¢ïŒç¶æ ã«å€æŽãã¹ãã§ããã
誰ãããã€ã§ãç¶æ ã倿Žã§ããããäžèšã®å®çŸ©ã«ãããã£ãŠã®ã¿è¡ãã¹ãã§ããã
Conformance checkers may use the information given on the WHATWG Wiki MetaExtensions page to establish if a value is allowed or not: values defined in this specification or marked as "proposed" or "ratified" must be accepted, whereas values marked as "discontinued" or not listed in either this specification or on the aforementioned page must be reported as invalid. Conformance checkers may cache this information (e.g. for performance reasons or to avoid the use of unreliable network connectivity).
When an author uses a new metadata name not defined by either this specification or the Wiki page, conformance checkers should offer to add the value to the Wiki, with the details described above, with the "proposed" status.
å€ãURLã®ãããªã¡ã¿ããŒã¿åã¯ãææ¡ãŸãã¯åãå
¥ããŠã¯ãªããªãããªã³ã¯ã¯ãmetaèŠçŽ ã§ã¯ãªããlinkèŠçŽ ãçšããŠè¡šçŸãããªããã°ãªããªãã
metaèŠçŽ ã§http-equiv屿§ãæå®ãããå ŽåãèŠçŽ ã¯ãã©ã°ããã£ã¬ã¯ãã£ãã§ããã
http-equiv屿§ã¯ãåæå±æ§ã§ããã以äžã®è¡šã¯ããã®å±æ§ã«å¯ŸããŠå®çŸ©ãããããŒã¯ãŒããåæãããããŒã¯ãŒããšãšãã«ãã®è¡ã®æåã®ã»ã«ã«äžããããç¶æ
ã¯ããããããŒã¯ãŒãã察å¿ããç¶æ
ãäžãããSome of the keywords are non-conforming, as noted in the last column.
| ç¶æ | ããŒã¯ãŒã | 泚 |
|---|---|---|
| Content Language | content-language
| Non-conforming |
| ãšã³ã³ãŒãã£ã³ã°å®£èš | content-type
| |
| ããã©ã«ãã¹ã¿ã€ã« | default-style
| |
| ãªãã¬ãã·ã¥ | refresh
| |
| Cookie setter | set-cookie
| Non-conforming |
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:
http-equiv="content-language")
This feature is non-conforming. Authors are encouraged to use the lang attribute instead.
This pragma sets the pragma-set default language. Until such a pragma is successfully processed, there is no pragma-set default language.
If the meta element has no content
attribute, then abort these steps.
If the element's content attribute contains a
"," (U+002C) character then abort these steps.
Let input be the value of the element's content attribute.
Let position point at the first character of input.
Collect a sequence of characters that are not space characters
Let candidate be the string that resulted from the previous step.
If candidate is the empty string, abort these steps.
Set the pragma-set default language to candidate.
This pragma is almost, but not quite, entirely unlike the HTTP
Content-Language header of the same name. [HTTP]
http-equiv="content-type"ïŒ
ãšã³ã³ãŒãã£ã³ã°å®£èšç¶æ
ã¯ãcharset屿§ã®èšå®ã®åãªã代æ¿åœ¢åŒã§ãããããã¯æåãšã³ã³ãŒãã£ã³ã°å®£èšã§ãããThis state's user agent requirements are all handled by the parsing section of the specification.
ãšã³ã³ãŒãã£ã³ã°å®£èšç¶æ
ã®http-equiv屿§ããã€metaèŠçŽ ã«å¯ŸããŠãcontent屿§ã¯ããªãã©ã«ã«æåå"text/html;"ããã®åŸã«ä»»æã®æ°ã®ç©ºçœæåãä»»æã§ç¶ãããã®åŸã«ãªãã©ã«ã«æåå"charset="ãç¶ãããã®åŸã«æåãšã³ã³ãŒãã£ã³ã°å®£èšã®æåãšã³ã³ãŒãã£ã³ã°ã®ã©ãã«ãç¶ããã®ãããªãæååãšASCII倧æåã»å°æåäžåºå¥ã§äžèŽããå€ãæããªããã°ãªããªãã
ææžã¯ããšã³ã³ãŒãã£ã³ã°å®£èšç¶æ
ã®http-equiv屿§ããã€metaèŠçŽ ãšãcharset屿§ã®ååšããmetaèŠçŽ ã®äž¡æ¹ãå«ãã§ã¯ãªããªãã
ãšã³ã³ãŒãã£ã³ã°å®£èšç¶æ
ã¯ãHTMLææžã§ããã³XMLææžã§äœ¿çšãããŠãããããšã³ã³ãŒãã£ã³ã°å®£èšç¶æ
ãXMLææžå
ã§äœ¿çšãããå Žåãæåãšã³ã³ãŒãã£ã³ã°ã®ååã¯ãæåå"UTF-8"ãšASCII倧æåã»å°æåäžåºå¥ã§äžèŽããªããã°ãªããªãïŒãããã£ãŠãææžã¯ããšã³ã³ãŒãã£ã³ã°ãšããŠUTF-8ã䜿çšãããã匷å¶ãããïŒã
ãšã³ã³ãŒãã£ã³ã°å®£èšç¶æ ã¯XMLææžã«ãããŠå¹æããªããåã«XHTMLããã®ç§»è¡ã容æã«ããããã«èš±å¯ãããã
http-equiv="default-style"ïŒ
ãã®ãã©ã°ãã¯ãããã©ã«ãã®ä»£æ¿ã¹ã¿ã€ã«ã·ãŒãã®ã»ããã®ååãèšå®ããã
If the meta element has no content
attribute, or if that attribute's value is the empty string, then abort these steps.
Set the preferred style sheet set to the value of the element's content attribute. [CSSOM]
http-equiv="refresh"ïŒ
ãã®ãã©ã°ãã¯ãæéåŒã®ãªãã€ã¬ã¯ããšããŠåäœããã
If another meta element with an http-equiv attribute in the Refresh state has already been successfully
processed (i.e. when it was inserted the user agent processed it and reached the last step of
this list of steps), then abort these steps.
If the meta element has no content
attribute, or if that attribute's value is the empty string, then abort these steps.
Let input be the value of the element's content attribute.
Let position point at the first character of input.
Collect a sequence of characters that are ASCII digits, and parse the resulting string using the rules for parsing non-negative integers. If the sequence of characters collected is the empty string, then no number will have been parsed; abort these steps. Otherwise, let time be the parsed number.
Collect a sequence of characters that are ASCII digits and "." (U+002E) characters. Ignore any collected characters.
Let url be the address of the current page.
If the character in input pointed to by position is a ";" (U+003B) character or a "," (U+002C) character, then advance position to the next character. Otherwise, jump to the last step.
If the character in input pointed to by position is a "U" (U+0055) character or a U+0075 LATIN SMALL LETTER U character (u), then advance position to the next character. Otherwise, jump to the last step.
If the character in input pointed to by position is a "R" (U+0052) character or a U+0072 LATIN SMALL LETTER R character (r), then advance position to the next character. Otherwise, jump to the last step.
If the character in input pointed to by position is s "L" (U+004C) character or a U+006C LATIN SMALL LETTER L character (l), then advance position to the next character. Otherwise, jump to the last step.
If the character in input pointed to by position is a "=" (U+003D), then advance position to the next character. Otherwise, jump to the last step.
If the character in input pointed to by position is either a "'" (U+0027) character or """ (U+0022) character, then let quote be that character, and advance position to the next character. Otherwise, let quote be the empty string.
Let url be equal to the substring of input from the character at position to the end of the string.
If quote is not the empty string, and there is a character in url equal to quote, then truncate url at that character, so that it and all subsequent characters are removed.
Strip any trailing space characters from the end of url.
Strip any "tab" (U+0009), "LF" (U+000A), and "CR" (U+000D) characters from url.
Resolve the url value to an
absolute URL, relative to the meta element. If this fails, abort
these steps.
Perform one or more of the following steps:
After the refresh has come due (as defined below), if the user has not canceled the
redirect and if the meta element's Document's active
sandboxing flag set does not have the sandboxed automatic features browsing
context flag set, navigate the
Document's browsing context to url, with
replacement enabled, and with the 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:
meta
element was inserted into the
Document, adjusted to take into account user or user agent
preferences.Provide the user with an interface that, when selected, navigates a browsing context to
url, with the Document's browsing context as
the source browsing context.
äœãããªãã
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屿§ããã€metaã«å¯ŸããŠãcontent屿§ã¯ãããããããªãå€ãæããªããã°ãªããªãïŒ
URL", followed by a "=" (U+003D) character, followed by a valid
URL that does not start with a literal "'" (U+0027) or """ (U+0022) character.åè ã®å ŽåãæŽæ°ã¯ããã®ããŒãžãåèªã¿èŸŒã¿ããããããåã®ç§æ°ã衚ããåŸè ã®å ŽåãæŽæ°ã¯ãäžããããURLã®ããŒãžã§çœ®ãæãããããããåã®ç§æ°ã衚ãã
ããŒãžã5åããšã«ãµãŒããŒããã®èªåçãªåèªã¿èŸŒã¿ã確å®ã«ããããã«ãå ±éæ©é¢ã®ããã³ãããŒãžã¯ããã®ããŒãžã®headèŠçŽ ã§æ¬¡ã®ããŒã¯ã¢ãããå«ããããããªãïŒ
<meta http-equiv="Refresh" content="300">
以äžã®ãããªããŒã¯ã¢ãããçšããŠãé£ç¶ããããŒãžã¯ãåããŒãžãé£ç¶ã§æ¬¡ã®ããŒãžã«ãªãã¬ãã·ã¥ãããããšã§ãèªåã¹ã©ã€ãã·ã§ãŒãšããŠäœ¿çšããããããããªãïŒ
<meta http-equiv="Refresh" content="20; URL=page4.html">
http-equiv="set-cookie")
This pragma sets an HTTP cookie. [COOKIES]
It is non-conforming. Real HTTP headers should be used instead.
If the meta element has no content
attribute, or if that attribute's value is the empty string, then abort these steps.
Act as if receiving a
set-cookie-string for the document's address via a "non-HTTP" API,
consisting of the value of the element's content
attribute encoded as UTF-8. [COOKIES] [RFC3629]
äžåºŠã«ææžã§ç¹å®ã®ç¶æ
ããã€è€æ°ã®metaèŠçŽ ãååšããŠã¯ãªããªãã
ãã©ã°ããã£ã¬ã¯ãã£ãã®å®çŸ©æžã¿ã»ããã«å¯Ÿããæ¡åŒµã¯ãWHATWG Wiki PragmaExtensions pageã«ç»é²ãããŠãããããããªãã[WHATWGWIKI]
ãã®ãããªæ¡åŒµã¯ãPermanent Message Header Field Registryã«ç»é²ãããHTTPããããŒãšåäžã®ååã䜿çšããªããã°ãªãããHTTPããããŒã«å¯ŸããŠèª¬æããããã®ãšåæ§ã«æ¯ãèããªããã°ãªããªãã[IANAPERMHEADERS]
ã¡ã¿ããŒã¿ãèšè¿°ããããããŒããŸãã¯ç¹å®ã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãåŠçãå¿ èŠãšããªããã®ã«å¯Ÿå¿ãããã©ã°ããã£ã¬ã¯ãã£ãã¯ãç»é²ãããŠã¯ãªããªãã代ããã«ã¡ã¿ããŒã¿åã䜿çšãããçµæãšããŠHTMLãå®è£ ãããŠãŒã¶ãŒãšãŒãžã§ã³ããšããã§ãªããŠãŒã¶ãŒãšãŒãžã§ã³ããšç°ãªãHTTPã¬ãã«ã®æ¯ãèããããããã®ã§ãHTTPåŠçã¢ãã«ã«åœ±é¿ãäžããããããŒïŒããšãã°ããã£ãã·ã¥ïŒã«çžåœãããã©ã°ããã£ã¬ã¯ãã£ãã¯ç»é²ãããŠã¯ãªããªãã
äžèšã®æ¡ä»¶ãæºãããã©ã°ããã£ã¬ã¯ãã£ãã®è¿œå ã¯ããã€ã§ãWHATWG Wiki PragmaExtensions pageãç·šéããããšã§èª°ããèªç±ã«ã§ããããã®ãããªç»é²ã¯ä»¥äžã®æ å ±ãæå®ããªããã°ãªããªãïŒ
å®éã®ååãå®çŸ©ãããŠãããååã¯ãåãèŠæ±ããã€ä»¥åã«ç»é²ãããHTTPã®ååãšäžèŽããªããã°ãªããªãã
ãã©ã°ããã£ã¬ã¯ãã£ãã®ç®çã®éèŠç¯çãªèª¬æã
Conformance checkers must use the information given on the WHATWG Wiki PragmaExtensions page to establish if a value is allowed or not: values defined in this specification or listed on the aforementioned page must be accepted, whereas values not listed in either this specification or on the aforementioned page must be rejected as invalid. Conformance checkers may cache this information (e.g. for performance reasons or to avoid the use of unreliable network connectivity).
æåãšã³ã³ãŒãã£ã³ã°å®£èšã¯ãææžã®èšæ¶ãŸãã¯äŒéã«çšããããæåãšã³ã³ãŒãã£ã³ã°ãæå®ããã¡ã«ããºã ã§ããã
以äžã®å¶éãæåãšã³ã³ãŒãã£ã³ã°å®£èšã«é©çšãããã
ããã«ãmetaèŠçŽ ã«ã¯å€ãã®å¶éããããããææžããšã«1ã€ã®metaããŒã¹ã®æåãšã³ã³ãŒãã£ã³ã°å®£èšã®ã¿ããããããããªãã
HTMLææžãBOMã§éå§ããããã€ãã®ãšã³ã³ãŒãã£ã³ã°ãContent-Typeã¡ã¿ããŒã¿ã«ãã£ãŠæç€ºçã«äžããããããã€ææžãiframe srcdocææžã§ãªãå Žåã䜿çšãããæåãšã³ã³ãŒãã£ã³ã°ã¯ASCIIäºææåãšã³ã³ãŒãã£ã³ã°ã§ãªããã°ãªããããšã³ã³ãŒãã£ã³ã°ã¯charset屿§ããã€metaèŠçŽ ãŸãã¯ãšã³ã³ãŒãã£ã³ã°å®£èšç¶æ
ã®http-equiv屿§ããã€metaèŠçŽ ãçšããŠæå®ãããªããã°ãªããªãã
ãã©ãŒã ã«ãŠãŒã¶ãŒãå ¥åãããã¹ã¯ãªããã«ãã£ãŠçæãããURLã§ãªã©ãæåãšã³ã³ãŒãã£ã³ã°ã¯éASCIIæåãåŠçããããã«å¿ èŠãšãããããããšã³ã³ãŒãã£ã³ã°ãUS-ASCIIã§ããå Žåã§ãã£ãŠããæåãšã³ã³ãŒãã£ã³ã°å®£èšã¯ãïŒContent-Typeã¡ã¿ããŒã¿å ãŸãã¯æç€ºçã«ãã¡ã€ã«å ã®ããããïŒãå¿ èŠã§ããã
ææžãiframe srcdocææžã§ããå Žåãææžã¯æåãšã³ã³ãŒãã£ã³ã°å®£èšãæã£ãŠã¯ãªããªããïŒãã®å Žåãææžã®äžéšã¯iframeãå«ãã§ããã®ã§ããœãŒã¹ã¯ãã§ã«ãã³ãŒããããŠãããïŒ
HTMLææžãcharset屿§ããã€metaèŠçŽ ãŸãã¯æåãšã³ã³ãŒãã£ã³ã°å®£èšã®http-equiv屿§ããã€metaèŠçŽ ãå«ãå Žåã䜿çšãããæåãšã³ã³ãŒãã£ã³ã°ã¯ASCIIäºææåãšã³ã³ãŒãã£ã³ã°ã§ãªããã°ãªããªãã
èè ã¯UTF-8ã䜿çšãã¹ãã§ãããé©åæ§æ€æ»ã¯ãèè ã«ã¬ã¬ã·ãŒãšã³ã³ãŒãã£ã³ã°ã䜿ãããšã«å察ããããå¿ åããŠãããã[RFC3629]
Authoring tools should default to using UTF-8 for newly-created documents. [RFC3629]
0x20ãã0x7EãŸã§ã®ç¯å²ã§äžé£ã®ãã€ããU+0020ããU+007EãŸã§ã®ç¯å²ã®æåãæ¯èŒãã以å€ã®æåã«ãã³ãŒãã§ãããšã³ã³ãŒãã£ã³ã°ã¯ãæœåšçãªã»ãã¥ãªãã£ãŒè匱æ§ã衚ãããšã³ã³ãŒãã£ã³ã°ããµããŒãããªãïŒãŸãã¯ãšã³ã³ãŒãã£ã³ã°ã宣èšããããã«äœ¿çšãããã©ãã«ããµããŒãããªãããŸãã¯ä»ã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãã®ããã«ã©ãã«ä»ããããªãã³ã³ãã³ãã®ãšã³ã³ãŒãã£ã³ã°ã宣èšããåãã¡ã«ããºã ã䜿çšããªãïŒãŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ãçµå±ã¯HTMLã¿ã°ããã³JavaScriptãšããŠæè¡çã«æž©åãªãã¬ãŒã³ããã¹ãã®æèã§è§£éããããšã«ãªããããããªãããããã£ãŠãèè
ã¯ãããã®ãšã³ã³ãŒãã£ã³ã°ã䜿çšãã¹ãã§ã¯ãªããããšãã°ãASCIIã§"<script>"ã«å¯Ÿå¿ãããã€ãã®ãšã³ã³ãŒãã£ã³ã°ã«é©çšãããšãç°ãªãæååããã³ãŒãããå¯èœæ§ããããAuthors should not use such encodings, which are known to include JIS_C6226-1983, JIS_X0212-1990,
HZ-GB-2312, JOHAB (Windows code page 1361), encodings based on
ISO-2022, and encodings based on EBCDIC. ããã«ãèè
ã¯ãCESU-8ãUTF-7ãBOCU-1ããã³SCSUãšã³ã³ãŒãã£ã³ã°ã䜿çšããŠã¯ãªããªãããããã®ãšã³ã³ãŒãã£ã³ã°ã¯ãŠã§ãã³ã³ãã³ããžã®äœ¿çšã«å¯ŸããŠå
šãæå³ãããŠããªãããããã®ã«ããŽãªã«åé¡ãããã[RFC1345]
[RFC1842]
[RFC1468]
[RFC2237]
[RFC1554]
[CP50220]
[RFC1922]
[RFC1557]
[CESU8]
[UTF7]
[BOCU1]
[SCSU]
ãã®ä»æ§ã§èª¬æããããšã³ã³ãŒãã£ã³ã°æ€åºã¢ã«ãŽãªãºã ã¯UTF-32ãšUTF-16ãæ æã«åºå¥ããªããããèè ã¯UTF-32ã䜿çšãã¹ãã§ã¯ãªãã[UNICODE]
UTF-8ã§ãªããšã³ã³ãŒãã£ã³ã°ã®äœ¿çšã¯ãããã©ã«ãã§ææžã®æåãšã³ã³ãŒãã£ã³ã°ã䜿ãããšã§ããã©ãŒã æåºããã³URLãšã³ã³ãŒãã£ã³ã°ã§äºæããªãçµæãæããããããªãã
XHTMLã«ãããŠãå¿ èŠãªãã°ãXML宣èšã¯ã€ã³ã©ã€ã³æåãšã³ã³ãŒãã£ã³ã°æ å ±ã«å¯ŸããŠäœ¿çšãããã¹ãã§ããã
HTMLã«ãããŠãæåãšã³ã³ãŒãã£ã³ã°ãUTF-8ã§ããããšã宣èšããããã«ãèè
ã¯ïŒheadèŠçŽ å
ã§ïŒææžã®ãããã®è¿ãã«ä»¥äžã®ããŒã¯ã¢ãããå«ããããããªãïŒ
<meta charset="utf-8">
XMLã«ãããŠãããŒã¯ã¢ããã®ã¯ããã§XML宣èšã¯ä»£ããã«çšãããããããããªãïŒ
styleèŠçŽ headèŠçŽ ã®åã§ããnoscriptèŠçŽ å
ãtype屿§ã®å€ã«äŸåããããäžèšã®æã«èšè¿°ãããèŠæ±ã«äžèŽããªããã°ãªããªããmedia â åãå
¥ãå¯èœãªã¡ãã£ã¢type â åã蟌ã¿ãªãœãŒã¹ã¿ã€ãtitle屿§ã¯ãã®èŠçŽ ã§ç¹å¥ãªã»ãã³ãã£ãã¯ãæã€ïŒä»£æ¿ã¹ã¿ã€ã«ã·ãŒãèšå®åãinterface HTMLStyleElement : HTMLElement {
attribute boolean disabled;
attribute DOMString media;
attribute DOMString type;
};
HTMLStyleElement implements LinkStyle;
styleèŠçŽ ã¯ãèè
ãææžã«ã¹ã¿ã€ã«æ
å ±ã®åã蟌ã¿ãèš±å¯ãããstyleèŠçŽ ã¯ãã¹ã¿ã€ãªã³ã°åŠçã¢ãã«ãžã®ãè€æ°ã®å
¥åã®1ã€ã§ããããã®èŠçŽ ã¯ããŠãŒã¶ãŒãžã®ã³ã³ãã³ãã衚ããã®ã§ãªãã
type屿§ã¯ã¹ã¿ã€ã«èšèªãäžããã屿§ãååšããå Žåããã®å€ã¯ã¹ã¿ã€ã«èšèªã瀺ã劥åœãªMIMEã¿ã€ãã§ãªããã°ãªããªããcharsetãã©ã¡ãŒã¿ãæå®ããŠã¯ãªããªãã屿§ãååšããªãå Žåã«çšããããtype屿§ã«å¯Ÿããããã©ã«ãå€ã¯ã"text/css"ã§ããã[RFC2318]
When examining types to
determine if they support the language, user agents must not ignore unknown MIME parameters
â types with unknown parameters must be assumed to be unsupported. The charset parameter must be treated as an unknown parameter for the purpose of
comparing MIME types here.
media屿§ã¯ãã¹ã¿ã€ã«ãé©çšãããã¡ãã£ã¢ãèšããå€ã¯åŠ¥åœãªã¡ãã£ã¢ã¯ãšãªã§ãªããã°ãªããªãã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.
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屿§ãçç¥ãããå Žåãããã©ã«ãã§ã¯"all"ã§ãããããã©ã«ãã®ã¹ã¿ã€ã«ã«ããããã¹ãŠã®ã¡ãã£ã¢ã«é©çšãããããšãæå³ããã
styleèŠçŽ ã®title屿§ã¯ä»£æ¿ã¹ã¿ã€ã«ã·ãŒãã®ã»ãããå®çŸ©ãããstyleèŠçŽ ãtitle屿§ãæããªãå Žåãã¿ã€ãã«ãæããªããå
ç¥ã®title屿§ã¯styleèŠçŽ ã«é©çšããªãã[CSSOM]
linkèŠçŽ ã®title屿§ã®ãããªãstyleèŠçŽ ã®title屿§ã¯ãã°ããŒãã«title屿§ãšã¿ã€ãã«ãªãã®styleãããã¯ã芪èŠçŽ ã®ã¿ã€ãã«ãç¶æ¿ããªããšããç¹ã§ç°ãªããããã¯åã«ã¿ã€ãã«ãæããªãã
styleèŠçŽ ã®textContentã¯ä»¥äžã®ABNFã§styleçæç©ãšå¯Ÿçã§ãªããã°ãªãããUnicodeã§ããæåã»ãããšãªãã[ABNF]
style = no-c-start *( c-start no-c-end c-end no-c-start ) no-c-start = < any string that doesn't contain a substring that matches c-start > c-start = "<!--" no-c-end = < any string that doesn't contain a substring that matches c-end > c-end = "-->"
All descendant elements must be processed, according to their semantics, before the
style element itself is evaluated. For styling languages that consist of pure text
(as opposed to XML), user agents must evaluate style elements by passing the
concatenation of the contents of all the Text nodes that are children of the
style element (not any other nodes such as comments or elements), in tree
order, to the style system. For XML-based styling languages, user agents must pass all the
child nodes of the style element to the style system.
All URLs found by the styling language's processor must be resolved, relative to the element (or as defined by the styling language), when the processor is invoked.
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 a simple 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 a simple 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.
The task source for these tasks is the DOM manipulation task source.
The element must delay the load event of the element's document until all the attempts to obtain the style sheet's critical subresources, if any, are complete.
ãã®ä»æ§ã¯ã¹ã¿ã€ã«èŠåãæå®ããªãããCSSã¯å€ãã®ãŠã§ããã©ãŠã¶ã«ãã£ãŠãµããŒããããããšãæåŸ ãããã[CSS]
The media and type IDL attributes must reflect the
respective content attributes of the same name.
disabledIDL屿§ã¯ã代æ¿ã¹ã¿ã€ã«ã·ãŒãDOMãžå®çŸ©ãããããã«æ¯ãèãã
LinkStyleã€ã³ã¿ãŒãã§ãŒã¹ã¯ãŸãããã®èŠçŽ ã§å®è£
ããããã¹ã¿ã€ãªã³ã°åŠçã¢ãã«ãæ¹æ³ãå®çŸ©ããã[CSSOM]
æ¬¡ã®ææžã¯ãããã©ã«ãã®ã€ã¿ãªãã¯äœã§äœåãšã©ãã³èªã®ã¿ã€ãã«ãæ®ãããŸãŸãã€ã¿ãªãã¯ããã¹ããããæããèµ€è²ã®ããã¹ããšããŠåŒ·èª¿ããã¹ã¿ã€ã«ãæã€ãé©åãªèŠçŽ ã䜿çšãããææžã®ããç°¡åãªåã¹ã¿ã€ã«ä»ããå¯èœã«ããæ¹æ³ã瀺ãã
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>My favorite book</title>
<style>
body { color: black; background: white; }
em { font-style: normal; color: red; }
</style>
</head>
<body>
<p>My <em>favorite</em> book of all time has <em>got</em> to be
<cite>A Cat's Life</cite>. It is a book by P. Rahmel that talks
about the <i lang="la">Felis Catus</i> in modern human society.</p>
</body>
</html>
linkããã³styleèŠçŽ ã¯ãææžãã¬ã³ããªã³ã°ããéã«äœ¿çšãããŠãŒã¶ãŒãšãŒãžã§ã³ãã«å¯ŸããŠã¹ã¿ã€ã«æ
å ±ãäŸçµŠã§ãããCSSããã³CSSOM仿§ã¯ãã¹ã¿ã€ã«æ
å ±ããŠãŒã¶ãŒãšãŒãžã§ã³ãã«ãã£ãŠã©ã®ããã«äœ¿çšããããããã³ã©ã®æ¹æ³ã§äœ¿çšãããããæå®ããã[CSS] [CSSOM]
styleããã³linkèŠçŽ ã¯ãLinkStyleã€ã³ã¿ãŒãã§ãŒã¹ãå®è£
ããã[CSSOM]
For style elements, if the user agent does not support the specified styling
language, then the sheet attribute of the element's
LinkStyle interface must return null. Similarly, link elements that do
not represent external resource links that contribute to the styling
processing model (i.e. that do not have a stylesheet
keyword in their rel attribute), for which the link is an
alternative stylesheet but whose title content attribute is
absent or empty, or whose resource is CORS-cross-origin, must have their
LinkStyle interface's sheet attribute return
null.
Otherwise, the LinkStyle interface's sheet attribute must return null if the corresponding element
is not in a Document,
and otherwise must return a StyleSheet object with the following properties: [CSSOM]
The style sheet type must be the same as the style's specified type. For
style elements, this is the same as the type
content attribute's value, or text/css if that is omitted. For
link elements, this is the Content-Type metadata of the
specified resource.
For link elements, the location must be the result of resolving the URL given by the element's href content attribute, relative to the element, or the empty
string if that fails. For style elements, there is no location.
The media must be the same as the value of the element's media
content attribute, or the empty string, if the attribute is omitted.
The title must be the same as the value of the element's title content attribute, if the attribute is present and has a non-empty
value. If the attribute is absent or its value is the empty string, then the style sheet does not
have a title (it is the empty string). The title is used for defining alternative style
sheet sets.
For link elements, true if the link is an alternative
stylesheet. In all other cases, false.
The same object must be returned each time.
The disabled IDL attribute on
link and style elements must return false and do nothing on setting, if
the sheet attribute of their LinkStyle
interface is null. Otherwise, it must return the value of the StyleSheet interface's
disabled attribute on getting, and forward the new
value to that same attribute on setting.
The rules for handling alternative style sheets are defined in the CSS object model specification. [CSSOM]
Style sheets, whether added by a link element, a style element, an
PI, an HTTP Link: header, or some
other mechanism, have a style sheet ready flag, which is initially unset.
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 synchronously 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.
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 the
element was created by that Document's parser, and 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, and the element's style sheet was enabled
when the element was created by the parser, and the element's style sheet ready flag
is not yet set, and, the last time the event loop reached step 1, the element was
in that Document, and 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.
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). Implementors 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.
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 is in 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.
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.