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