📄 conform.html
字号:
<dt><strong><a name="x29"><span class="index-def"title="sibling">Sibling</span></a></strong><dd>An element A is called a sibling of an element B, if and only if Band A share the same parent element. Element A is a preceding siblingif it comes before B in the document tree. Element B is a followingsibling if it comes after B in the document tree.<dt><strong><span class="index-def" title="precedingelement|element::preceding"><a name="preceding">Preceding element</a></span></strong><dd>An element A is called a preceding element of an element B, if andonly if (1) A is an ancestor of B or (2) A is a preceding sibling ofB.<dt><strong><a name="x32"><span class="index-def" title="followingelement|element::following">Following element</span></a></strong><dd>An element A is called a following element of an element B, if andonly if B is a preceding element of A.<dt><strong><strong><a name="author">Author</a></strong></strong><dd>An author is a person who writesdocuments and associated style sheets. An <a name="x34"><span class="index-def" title="authoring tool"><strong>authoring tool</strong></span></a>generates documents and associated style sheets.</dd><dt><strong><strong><a name="user">User</a></strong></strong> <dd> A user is a person who interacts with a user agent to view, hear, orotherwise use a document and its associated style sheet. The usermay provide a personal style sheet that encodes personalpreferences.</dd><dt><strong><strong><a name="user-agent">User agent (UA)</a></strong></strong><dd>A <a name="x35"><span class="index-def" title="user agent|UA">useragent</span></a> is any program that interprets a document written inthe document language and applies associated style sheets accordingto the terms of this specification. A user agent may display adocument, read it aloud, cause it to be printed, convert itto another format, etc.</dd></dl><div class="html-example"><p>Here is an example of a source document encoded in HTML:<PRE><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"><HTML> <TITLE>My home page</TITLE> <BODY> <H1>My home page</H1> <P>Welcome to my home page! Let me tell you about my favorite composers: <UL> <LI> Elvis Costello <LI> Johannes Brahms <LI> Georges Brassens </UL> </BODY></HTML></PRE><P>This results in the following tree:</P><div class="figure"><P><IMG src="images/doctree.gif" alt="Sample document tree"><SPAN class="dlink"> <A name="img-doctree" href="images/longdesc/doctree-desc.html" title="Long description for sample document tree diagram">[D]</A></SPAN></p></div><P>According to the definition of HTML, HEAD elements will be inferredduring parsing and become part of the document tree even if the HEADtags are not in the document source. Similarly, the parser knows wherethe P and LIs end, even though there are no </P> and </LI> tagsin the source.</div><h2>3.2 <a name="conformance">Conformance</a></h2><P>This section defines <a name="x37"><span class="index-def"title="conformance">conformance</span></a> with the CSS2specification only. There may be other levels of CSS in the futurethat may require a user agent to implement a different set of featuresin order to conform.<P>In general, the following points must be observed by a user agentclaiming conformance to this specification:</P><ol><li>It must support one or more of theCSS2 <a href="media.html">media types</a>.<li>For each source document, it must attempt to retrieve all associated style sheets that are appropriate for the supported mediatypes. If it cannot retrieve all associated style sheets (for instance,because of network errors), it must display the document using thoseit can retrieve.<li>It must parse the style sheets according to this specification.In particular, it must recognize all at-rules, blocks, declarations,and selectors (see the <a href="grammar.html">grammar of CSS2</a>).If a user agent encounters a property that applies for a supportedmedia type, the user agent must parse the value according to the propertydefinition. This means that the user agent must accept all validvalues and must <a name="x38"><span class="index-inst" title="ignore">ignore</span></a> declarations withinvalid values. Useragents must <a name="x39"><span class="index-inst" title="ignore">ignore</span></a>rules that apply to unsupported <a href="media.html">mediatypes</a>.<li>For each element in a <a href="#doctree">document tree</a>, it mustassign a value for every applicable property according tothe property's definition and the rules of <a href="cascade.html">cascading and inheritance</a>.<li>If the source document comes with alternate style sheets (such aswith the "alternate" keyword in HTML 4.0 <a href="refs.html#ref-HTML40" rel="biblioentry" class="noxref"><span class="informref">[HTML40]</span></a>), the UA mustallow the user to select one from among these style sheets and applythe selected one.</ol><P>Not every user agent must observe every point, however:</p><ul><li>A user agent that <em>inputs</em> style sheets mustrespect points 1 - 3.<li>An authoring tool is only required to output <ahref="#valid-style-sheet">valid style sheets</a><li>A user agent that <em>renders</em> a document with associated stylesheets must respect points 1 - 5 and render the documentaccording to the media-specific requirements set forth in thisspecification. <a href="cascade.html#actual-value">Values</a> may be approximated when required by the user agent.</ul><P>The inability of a user agent to implement part of thisspecification due to the limitations of a particular device (e.g., auser agent cannot render colors on a monochrome monitor or page) doesnot imply non-conformance. </P><p>This specification recommends that a user agent allow the user tospecify user style sheets.<h2><a name="q3">3.3 Error conditions</a></h2><P>In general, this document does not specify error handling behaviorfor user agents (e.g., how they behave when they cannot finda resource designated by a URI).<P>However, user agents must observe the <ahref="syndata.html#parsing-errors">rules for handling parsing errors</a>.<P>Since user agents may vary in how they handle error conditions,authors and users must not rely on specific error recovery behavior.<H2>3.4 <span class="index-def" title="text/css"><aname="text-css">The text/css content type</a></span></H2><p>CSS style sheets that exist in separate files are sent over theInternet as a sequence of bytes accompanied by encoding information(see <a href="refs.html#ref-HTML40" rel="biblioentry" class="noxref"><span class="normref">[HTML40]</span></a>, chapter 5). The structure of the transmission,termed a <span class="index-def" title="message entity"><aname="message-entity"><strong>message entity,</strong></a></span> isdefined by RFC 2045 and RFC 2068 (see <a href="refs.html#ref-RFC2045" rel="biblioentry" class="noxref"><span class="normref">[RFC2045]</span></a> and <a href="refs.html#ref-RFC2068" rel="biblioentry" class="noxref"><span class="normref">[RFC2068]</span></a>). Amessage entity with a content type of "text/css" represents anindependent CSS document. The "text/css" content type hasbeen registered by RFC 2138 (<a href="refs.html#ref-2318" rel="biblioentry" class="noxref"><span class="normref">[RFC2318]</span></a>).<hr class="navbar"><div class="navbar" align="center"><p><a href="intro.html">previous</a> <a href="syndata.html">next</a> <a href="cover.html#minitoc">contents</a> <a href="propidx.html">properties</a> <a href="indexlist.html">index</a> </div></BODY></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -