Skip to content

Commit 60a629a

Browse files
committed
[css2] Examples/markup corrected based on xextr
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%40589
1 parent d1cda74 commit 60a629a

15 files changed

Lines changed: 299 additions & 178 deletions

css2/about.src

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: about.src,v 1.21 1997-12-16 20:46:23 ijacobs Exp $ -->
3+
<!-- $Id: about.src,v 1.22 1997-12-29 22:02:05 ijacobs Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>About the CSS2 Specification</TITLE>
@@ -153,12 +153,11 @@ occur, in any order.
153153
</ul>
154154

155155
<P>Juxtaposition is stronger than the double bar, and the double bar
156-
is stronger than the bar.
157-
158-
<div class="example"><P>
159-
Thus, <samp>a b | c || d e</samp>
160-
is equivalent to <samp>[ a b ] | [ c || [ d e ]]</samp>.
161-
</div>
156+
is stronger than the bar. Thus, the following lines are equivalent:
157+
<PRE>
158+
a b | c || d e
159+
[ a b ] | [ c || [ d e ]]
160+
</PRE>
162161

163162
<P> Every type, keyword, or bracketed group may be followed by one of
164163
the following modifiers:
@@ -183,7 +182,6 @@ the following modifiers:
183182
</UL>
184183

185184

186-
<div class="example"><P>
187185
The following examples illustrate different value types:
188186

189187
<BLOCKQUOTE>
@@ -193,7 +191,6 @@ The following examples illustrate different value types:
193191
<EM>Value:</EM> &lt;uri&gt;? &lt;color&gt; [ / &lt;color&gt; ]?<BR>
194192
<EM>Value:</EM> &lt;uri&gt; || &lt;color&gt;<BR>
195193
</BLOCKQUOTE>
196-
</div>
197194

198195
<dt><strong>Initial</strong>
199196

@@ -294,9 +291,15 @@ EXAMPLE". Deprecated examples also include recommended alternate
294291
solutions. All examples that illustrates illegal usage are clearly
295292
marked as "ILLEGAL EXAMPLE".
296293

294+
<P>All <a rel="biblioentry" href="./refs.html#ref-HTML40"
295+
class="informref">[HTML40]</a> examples conform to the strict DTD
296+
unless otherwise indicated by a document type declaration.
297+
297298
<P>Examples and notes are marked within the source HTML for the
298299
specification and some user agents may render them specially.
299300

301+
<!-- Which HTML DTD do the examples come from? -->
302+
300303
<H2>Acknowledgments</H2>
301304

302305
<P>This specification is the product of the W3C Working Group on

css2/aural.src

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: aural.src,v 1.11 1997-12-12 18:02:45 ijacobs Exp $ -->
3+
<!-- $Id: aural.src,v 1.12 1997-12-29 22:02:08 ijacobs Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Aural style sheets</TITLE>
@@ -504,13 +504,13 @@ naturally as various pauses.
504504
spoken. month-day-year is common in the USA, while day-month-year is
505505
common in Europe and year-month-day is also used.
506506

507-
<div class="example"><P>
507+
<div class="xml-example"><P>
508508
This would be useful, for example, when combined with an XML
509509
element used to identify dates, such as:
510510

511511
<pre>
512-
&lt;para&gt;The campaign started on &lt;date value="1874-10-21"/&gt;
513-
and finished &lt;date value="1874-10-28/"&gt;&lt;/para%gt;
512+
&lt;PARA&gt;The campaign started on &lt;DATE value="1874-10-21"/&gt;
513+
and finished &lt;DATE value="1874-10-28/"&gt;&lt;/PARA&gt;
514514
</pre>
515515
</div>
516516

css2/cascade.src

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: cascade.src,v 1.25 1997-12-27 00:24:07 ijacobs Exp $ -->
3+
<!-- $Id: cascade.src,v 1.26 1997-12-29 22:02:12 ijacobs Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Assigning property values, Cascading, and Inheritance</TITLE>
@@ -92,7 +92,7 @@ values">inherited</span> by the descendants of a node in the <a
9292
href="convent.html#doctree">document tree</a>. Each property
9393
definition specifies whether its value may be inherited.
9494

95-
<div class="example"><P>
95+
<div class="html-example"><P>
9696
Suppose there is an H1 element with an emphasized element inside:
9797

9898
<PRE>
@@ -154,10 +154,10 @@ H1 {font-size: 120%}
154154

155155
<p>and the document fragment:
156156

157-
<pre>
157+
<pre class="html-example">
158158
&lt;BODY&gt;
159159
&lt;H1&gt;A &lt;EM&gt;large&lt;/EM&gt; heading&lt;/H1&gt;
160-
...
160+
&lt;/BODY&gt;
161161
</pre>
162162

163163
<p>The <a href="#computed-value">computed value</a> of the <span
@@ -328,13 +328,16 @@ Some examples:
328328
weight as a declaration with an "id"-based selector that is specified
329329
at the end of the style sheet:
330330

331-
<div class="example"><P>
331+
<div class="html-example"><P>
332332
<PRE>
333+
&lt;HEAD&gt;
333334
&lt;STYLE type="text/css"&gt;
334335
#x97z { color: blue }
335336
&lt;/STYLE&gt;
336-
337+
&lt;/HEAD&gt;
338+
&lt;BODY&gt;
337339
&lt;P ID=x97z style="color: red"&gt;
340+
&lt;/BODY&gt;
338341
</PRE>
339342

340343
<P> In the above example, the color of the P element would be

css2/conform.src

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: conform.src,v 1.32 1997-12-27 00:22:41 ijacobs Exp $ -->
3+
<!-- $Id: conform.src,v 1.33 1997-12-29 22:02:17 ijacobs Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Conformance: requirements and recommendations</TITLE>
@@ -106,7 +106,7 @@ if B and A share the same parent element. Element A is a preceding
106106
sibling if it comes before B in the document tree. Element B is a
107107
following sibling if it comes after B in the document tree.
108108

109-
<div class="example"><P>
109+
<div class="html-example"><P>
110110
For example, the following HTML document:
111111
<PRE>
112112
&lt;HTML&gt;

css2/fonts.src

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: fonts.src,v 1.29 1997-12-28 23:26:27 ijacobs Exp $ -->
3+
<!-- $Id: fonts.src,v 1.30 1997-12-29 22:02:44 ijacobs Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Fonts</TITLE>
@@ -206,13 +206,21 @@ title="&lt;generic-family&gt;::definition of"><a name="value-def-generic-family"
206206

207207
<P> Font names containing whitespace should be quoted.
208208

209-
<div class="example"><P>
209+
<div class="html-example"><P>
210210
For example:
211211

212212
<PRE>
213-
BODY { font-family: "new century schoolbook", serif }
214-
213+
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&gt;
214+
&lt;HTML&gt;
215+
&lt;HEAD&gt;
216+
&lt;STYLE type="text/css"&gt;
217+
BODY { font-family: "new century schoolbook", serif }
218+
&lt;/STYLE&gt;
219+
&lt;/HEAD&gt;
215220
&lt;BODY style="font-family: 'My own font', fantasy"&gt;
221+
&lt;P&gt;What's up, Doc?
222+
&lt;/BODY&gt;
223+
&lt;/HTML&gt;
216224
</PRE>
217225
</div>
218226

@@ -316,7 +324,8 @@ with font names and a numerical scale was therefore chosen for the
316324

317325
<P> The 'bolder' and 'lighter' values select font weights that are
318326
relative to the weight inherited from the parent:
319-
<PRE>
327+
328+
<PRE>
320329
STRONG { font-weight: bolder }
321330
</PRE>
322331
</div>
@@ -820,11 +829,12 @@ apply to, or whether the values are inherited by child elements.
820829
<P>The available font descriptors are described in later sections of
821830
this specification.
822831

823-
<div class="example"><P>
832+
<div class="html-example"><P>
824833
<p>For example, here the font 'Robson Celtic' is defined and
825834
referenced in a style sheet contained in an HTML document.
826835

827-
<PRE>&lt;HTML&gt;
836+
<PRE>
837+
&lt;HTML&gt;
828838
&lt;HEAD&gt;
829839
&lt;TITLE&gt;Font test&lt;/TITLE&gt;
830840
&lt;STYLE TYPE="text/css" MEDIA="screen, print"&gt;
@@ -1937,7 +1947,7 @@ that the weight will also match any request in the
19371947
range 300 to 500). The font family is Alabama and the adorned font
19381948
name is Alabama Italic.</P>
19391949

1940-
<PRE>&lt;STYLE&gt;
1950+
<PRE>
19411951
@font-face {
19421952
src: local(Alabama Italic),
19431953
url(http://www.fonts.org/A/alabama-italic) format(truetype);
@@ -1946,7 +1956,7 @@ name is Alabama Italic.</P>
19461956
font-weight: 300, 400, 500;
19471957
font-style: italic, oblique;
19481958
}
1949-
&lt;/STYLE&gt;</PRE>
1959+
</PRE>
19501960
</div>
19511961

19521962
<div class="example"><P>
@@ -1956,7 +1966,7 @@ styles and weights of the named font. Once one of these
19561966
@font-face definitions has been dereferenced, the data will
19571967
be in the UA cache for other faces that use the same URI.</P>
19581968

1959-
<PRE>&lt;STYLE&gt;
1969+
<PRE>
19601970
@font-face {
19611971
src: local(Helvetica Medium),
19621972
url(http://www.fonts.org/sans/Helvetica_family) format(truedoc);
@@ -1970,7 +1980,7 @@ be in the UA cache for other faces that use the same URI.</P>
19701980
font-style: oblique;
19711981
slope: -18
19721982
}
1973-
&lt;/STYLE&gt;</PRE>
1983+
</PRE>
19741984
</div>
19751985

19761986
<div class="example"><P>
@@ -1980,7 +1990,7 @@ src descriptor to allow locally installed versions to be preferentially
19801990
used if available. A fourth rule points to a font with the same coverage,
19811991
but contained in a single resource.
19821992

1983-
<PRE>&lt;STYLE&gt;
1993+
<PRE>
19841994
@font-face {
19851995
font-family: Excelsior;
19861996
src: local(Excelsior Roman), url(http://site/er) format(intellifont);
@@ -2000,8 +2010,7 @@ but contained in a single resource.
20002010
font-family: Excelsior;
20012011
src: url(http://site/excels) format(truedoc);
20022012
unicode-range: U+??,U+100-220,U+4??;
2003-
2004-
&lt;/STYLE&gt;</PRE>
2013+
</PRE>
20052014
</div>
20062015

20072016
<div class="example"><P>
@@ -2011,7 +2020,7 @@ a wide variety of serif fonts that might exist on various
20112020
platforms. No metrics are given since these vary between the possible
20122021
alternatives.
20132022

2014-
<PRE>&lt;STYLE&gt;
2023+
<PRE>
20152024
@font-face {
20162025
src: local(Palatino),
20172026
local(Times New Roman),
@@ -2024,7 +2033,7 @@ alternatives.
20242033
font-variant: normal;
20252034
font-size: all
20262035
}
2027-
&lt;/STYLE&gt;</PRE>
2036+
</PRE>
20282037
</div>
20292038

20302039
</BODY>

css2/intro.src

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: intro.src,v 1.15 1997-12-24 20:12:39 ijacobs Exp $ -->
3+
<!-- $Id: intro.src,v 1.16 1997-12-29 22:02:51 ijacobs Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Introduction to CSS2</TITLE>
@@ -48,7 +48,7 @@ source HTML document, and they may be shared among several documents.
4848
<samp>bach.css</samp>, and associate it with the source HTML document
4949
via the LINK element:
5050

51-
<PRE class="example">
51+
<PRE class="html-example">
5252
&lt;HTML&gt;
5353
&lt;TITLE&gt;Bach's home page&lt;/TITLE&gt;
5454
&lt;LINK rel="stylesheet" href="bach.css" type="text/css"&gt;
@@ -91,7 +91,7 @@ describes how HTML elements should be rendered by default.
9191
<P>Let's extend our example to include a simple list of
9292
three favorite Bach compositions:
9393

94-
<PRE class="example">
94+
<PRE class="html-example">
9595
&lt;HTML&gt;
9696
&lt;TITLE&gt;Bach's home page&lt;/TITLE&gt;
9797
&lt;LINK rel="stylesheet" href="bach.css" type="text/css"&gt;

0 commit comments

Comments
 (0)