Wed, 09 Dec 2009 22:38:19 +0000
Add conformance section, rename tokens in grammar to be mroe clear
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
2 <html lang="en">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5 <title>CSS Style Attribute Syntax Level 1</title>
6 <link rel="stylesheet" type="text/css" href="../default.css">
8 <link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-ED">
9 </head>
11 <div class="head">
12 <!--logo-->
14 <h1>CSS Namespaces Module</h1>
16 <h2 class="no-num no-toc">[LONGSTATUS] [DATE]</h2>
17 <dl>
18 <dt>This version:</dt>
19 <!-- <dd><dd><a href="http://www.w3.org/TR/[YEAR]/WD-css-style-attr-[CDATE]/">http://www.w3.org/TR/[YEAR]/WD-css-style-attr-[CDATE]/</a></dd> -->
20 <dd><a href="http://dev.w3.org/csswg/css-style-attr/">http://dev.w3.org/csswg/css-style-attr/</a>
21 <dt>Latest version:
22 <dd><a href="http://www.w3.org/TR/css-style-attr">http://www.w3.org/TR/css-style-attr</a>
23 <dt>Previous version:
24 <dd><a href="http://www.w3.org/TR/2002/WD-css-style-attr-20020515">http://www.w3.org/TR/2002/WD-css-style-attr-20020515</a>
25 <dt>Editor:
26 <dd><a href="http://fantasai.inkedblade.net/contact/">Elika J. Etemad</a>
27 <dt>Previous Editors:
28 <dd><span lang="tr">Tantek Çelik</span> (<a href="http://www.microsoft.com/">Microsoft</a>), <<a href="mailto:tantekc@microsoft.com">tantekc@microsoft.com</a>>
29 <dd><a href="http://www.w3.org/People/Bos/">Bert Bos</a> (<a href="http://www.w3.org/">W3C</a>), <<a href="mailto:bert@w3.org">bert@w3.org</a>>
30 <dd>Marc Attinasi (AOL/Netscape), <<a href="mailto:attinasi@netscape.com">attinasi@netscape.com</a>>
31 </dl>
32 <!--begin-copyright-->
33 <p>[Here will be included the file "../copyright.inc"]</p>
34 <!--end-copyright-->
36 <hr title="Separator for header">
37 </div>
39 <h2 class="no-num no-toc" id="abstract">Abstract</h2>
41 <p>Markup languages such as HTML and SVG provide a "style" attribute on most
42 elements, to hold a fragment of a style sheet that applies to those elements.
43 One of the possible style sheet languages is CSS. This draft describes the
44 syntax of the CSS fragment that can be used in the "style" attribute.
46 <h2 class="no-num no-toc" id="status">Status of this document</h2>
47 <!--status-->
49 <h2 class="no-num no-toc" id="contents">Table of contents</h2>
50 <!--toc-->
52 <h2 id="intro">Introduction</h2>
54 <p>Several XML-based document formats have a "style" attribute to permit the
55 author to directly apply style information to specific elements in documents.
56 If a document format defines a "style" attribute and the attribute accepts CSS
57 as its value, then this specification describes the attribute's syntax and
58 interpretation.
60 <div class="example">
61 <p>The following example shows the use of the <code>style</code> attribute
62 in HTML:</p>
63 <pre><p style="<em>color: #090; line-height: 1.2</em>">...</p></pre>
64 </div>
66 <h2 id="syntax">Syntax</h2>
68 <p>The syntax of the style attribute syntax is exactly the same as the
69 contents of a CSS
70 <a href="http://www.w3.org/TR/CSS21/syndata.html#rule-sets">declaration block</a>.
71 A close brace (<code>}</code>) in the style attribute value does not
72 terminate the style data; it is merely an invalid token.
74 <p>The same rules for forward-compatible parsing apply to the inline style
75 sheet as to a normal style sheet. See <a href="/TR/CSS21/syndata.html">chapter
76 4 of the CSS2.1 specification</a>. [[!CSS21]]
78 <h2 id="grammar">Grammar</h2>
80 <p>The syntax of the CSS fragment that is allowed in the HTML "style"
81 attribute can be formally specified as follows:
83 <pre>
84 inline-stylesheet
85 : S* declaration-list
86 ;
88 declaration-list
89 : declaration [ ';' S* declaration ]*
90 ;
91 </pre>
93 <p>Please refer to the grammar in <a href="/TR/CSS21/grammar.html">appendix D
94 of the CSS2.1 specification</a> [[!CSS21]] for the definition of the symbols
95 not defined here.
97 <h2 id="cascading">Cascading</h2>
99 <p>The declarations in a style attribute apply to the element to which
100 the attribute belongs. CSS2.1 <a href="/TR/CSS21/cascade.html#specificity">defines</a>
101 how style sheets and "style" attributes are cascaded together. [[!CSS21]]
103 <h2 id="interpret">Interpretation</h2>
105 <p>Aside from the differences in cascading, the declarations in a style
106 attribute must be interpreted exactly as if they were given in a style
107 rule that selected the associated element in a CSS style sheet associated
108 with the document.
110 <h2 id="conformance">Conformance</h2>
112 <p>The conformance requirements are expressed with a combination of
113 descriptive assertions and RFC 2119 terminology. The key words "MUST",
114 "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT",
115 "RECOMMENDED", "MAY", and "OPTIONAL" in the normative parts of this
116 document are to be interpreted as described in RFC 2119.
117 However, for readability, these words do not appear in all uppercase
118 letters in this specification. All of the text of this specification is
119 normative except sections explicitly marked as non-normative, examples,
120 and notes. [[!RFC2119]]</p>
122 <p>Examples in this specification are introduced with the words "for example"
123 or are set apart from the normative text with <code>class="example"</code>,
124 like this:
126 <div class="example">
127 <p>This is an example of an informative example.</p>
128 </div>
130 <p>Informative notes begin with the word "Note" and are set apart from the
131 normative text with <code>class="note"</code>, like this:
133 <p class="note">Note, this is an informative note.</p>
135 <h2 id="ack">Acknowledgments</h2>
137 <p>Thanks to feedback from Daniel Glazman, Ian Hickson, Eric A. Meyer,
138 Björn Höhrmann.
140 <h2 id="references">References
142 <h3 class="no-num" id="normative-references">Normative references</h3>
144 <!--begin-normative-->
145 <p>[Here will be inserted the file "normative.inc"]</p>
146 <!--end-normative-->
148 <h3 class="no-num" id="informative-references">Informative references</h3>
150 <!--begin-informative-->
151 <p>[Here will be inserted the file "informative.inc"]</p>
152 <!--end-informative-->
154 </body>
155 </html>
156 <!-- Keep this comment at the end of the file
157 Local variables:
158 mode: sgml
159 sgml-declaration:"~/SGML/HTML4.decl"
160 sgml-default-doctype-name:"html"
161 sgml-minimize-attributes:t
162 sgml-nofill-elements:("pre" "style" "br")
163 End:
164 -->