Skip to content

Commit d97ab0b

Browse files
committed
[css2] upgrading sample sheet from HTML 2.0 to HTML 4.0
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%40289
1 parent 01a8164 commit d97ab0b

1 file changed

Lines changed: 228 additions & 48 deletions

File tree

css2/sample.src

Lines changed: 228 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,258 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: sample.src,v 1.8 1997-10-03 22:21:24 ian Exp $ -->
3+
<!-- $Id: sample.src,v 1.9 1997-10-29 09:36:46 howcome Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6-
<TITLE>Appendix A: A sample style sheet for HTML 2.0</TITLE>
6+
<TITLE>Appendix A: A sample style sheet for HTML 4.0</TITLE>
77
<LINK rel="next" href="changes.html">
88
<LINK rel="previous" href="aural.html">
99
<LINK rel="STYLESHEET" href="style/default.css" type="text/css">
1010
</HEAD>
1111
<BODY>
12-
<H1 align="center">Appendix A: A sample style sheet for HTML 2.0</H1>
12+
<H1 align="center">Appendix A: A sample style sheet for HTML 4.0</H1>
1313
<P><em>This appendix is informative, not normative.</em></P>
1414

15-
<P> The following style sheet is written according to the suggested
16-
rendering in the HTML 2.0 (see <a rel="biblioentry"
17-
href="./refs.html#ref-RFC1866">[RFC1866]</a>) specification. Some
18-
styles, e.g., colors, have been added for completeness.
15+
<P>The Base Stylesheet describes the "consensus default" rendering of
16+
all HTML 4.0 <a rel="biblioentry"
17+
href="./refs.html#ref-HTML40">[HTML40]</a>) elements in
18+
Mosaic-derivative Web browsers (Netscape Navigator and Microsoft
19+
Internet Explorer).
20+
1921

2022
<PRE>
21-
BODY {
22-
margin: 1em;
23-
font-family: serif;
24-
line-height: 1.1;
25-
background: white;
26-
color: black;
27-
}
23+
/* rendered CSS1-addressable elements and all applicable non-inherited
24+
properties set to initial values and default display types */
25+
26+
A, ACRONYM, ADDRESS, BDO, BLOCKQUOTE, BODY, BUTTON, CITE, CODE, DD, DEL, DFN,
27+
DIV, DL, DT, EM, FIELDSET, FORM, H1, H2, H3, H4, H5, H6, IFRAME, IMG, INS, KBD,
28+
LABEL, LI, OBJECT, OL, P, Q, SAMP, SMALL, SPAN, STRONG, SUB, SUP, UL, VAR,
29+
APPLET, B, BIG, CENTER, DIR, FONT, HR, I, MENU, PRE, S, STRIKE, TT, U {
30+
background: transparent;
31+
width: auto;
32+
height: auto;
33+
text-decoration: none;
34+
margin: 0;
35+
padding: 0;
36+
border: 0;
37+
float: none;
38+
clear: none;
39+
vertical-align: baseline;
40+
list-style-image: none;
41+
list-style-type: disc;
42+
list-style-position: outside;
43+
}
44+
45+
ADDRESS, BLOCKQUOTE, BODY, DD, DIV, DL, DT, FIELDSET, FORM, H1, H2, H3, H4, H5,
46+
H6, IFRAME, OBJECT, OL, P, UL, APPLET, CENTER, DIR, HR, MENU, PRE {
47+
display: block;
48+
}
49+
50+
A, ACRONYM, BDO, BUTTON, CITE, CODE, DEL, DFN, EM, IMG, INS, KBD, LABEL, Q,
51+
SAMP, SMALL, SPAN, STRONG, SUB, SUP, VAR, B, BIG, FONT, I, S, STRIKE, TT, U {
52+
display: inline;
53+
}
54+
55+
LI {
56+
display: list-item;
57+
}
58+
59+
60+
/* Begin tree of inherited properties and cascades. */
61+
62+
BODY {
63+
font-size: 1em;
64+
line-height: 1.33em;
65+
margin: 8px;
66+
background-position: -8px -8px; /* flush with canvas edge */
67+
word-spacing: normal;
68+
letter-spacing: normal;
69+
text-transform: none;
70+
text-align: left;
71+
text-indent: 0;
72+
white-space: normal;
73+
}
74+
75+
H1 {
76+
font-size: 2em;
77+
margin: .67em 0;
78+
}
79+
80+
H2 {
81+
font-size: 1.5em;
82+
margin: .83em 0;
83+
}
84+
85+
H3 {
86+
font-size: 1.17em;
87+
line-height: 1.17em;
88+
margin: 1em 0;
89+
}
90+
91+
H4, P, BLOCKQUOTE, UL, OL, DL, DIR, MENU {
92+
margin: 1.33em 0;
93+
}
94+
95+
H5 {
96+
font-size: .83em;
97+
line-height: 1.17em;
98+
margin: 1.67em 0;
99+
}
100+
101+
H6 {
102+
font-size: .67em;
103+
margin: 2.33em 0;
104+
}
105+
106+
H1, H2, H3, H4, H5, H6, B, STRONG {
107+
font-weight: bolder;
108+
}
109+
110+
BLOCKQUOTE {
111+
margin-left: 40px;
112+
margin-right: 40px;
113+
}
114+
115+
I, CITE, EM, VAR, ADDRESS {
116+
font-style: italic;
117+
}
118+
119+
PRE, TT, CODE, KBD, SAMP {
120+
font-family: monospace;
121+
}
122+
123+
PRE {
124+
white-space: pre;
125+
}
126+
127+
BIG {
128+
font-size: 1.17em;
129+
}
130+
131+
SMALL, SUB, SUP {
132+
font-size: .83em;
133+
}
134+
135+
SUB {
136+
vertical-align: sub;
137+
}
138+
139+
SUP {
140+
vertical-align: super;
141+
}
142+
143+
S, STRIKE, DEL {
144+
text-decoration: line-through;
145+
}
146+
147+
HR {
148+
border: 1px inset;
149+
}
150+
151+
OL, UL, DIR, MENU, DD {
152+
margin-left: 40px;
153+
}
154+
155+
OL LI {
156+
list-style-type: decimal;
157+
}
158+
159+
OL UL {
160+
margin-top: 0;
161+
margin-bottom: 0;
162+
}
163+
164+
UL OL {
165+
margin-top: 0;
166+
margin-bottom: 0;
167+
}
168+
169+
UL UL {
170+
margin-top: 0;
171+
margin-bottom: 0;
172+
}
173+
174+
OL OL {
175+
margin-top: 0;
176+
margin-bottom: 0; /* how far to carry such contextual declarations? Exhaustive list
177+
could be very long. */
178+
}
179+
180+
U, INS {
181+
text-decoration: underline;
182+
}
183+
184+
CENTER {
185+
text-align: center;
186+
}
28187

29-
H1, H2, H3, H4, H5, H6, P, UL, OL, DIR, MENU, DIV,
30-
DT, DD, ADDRESS, BLOCKQUOTE, PRE, BR, HR, FORM, DL { display: block }
31188

32-
B, STRONG, I, EM, CITE, VAR, TT, CODE, KBD, SAMP,
33-
IMG, SPAN { display: inline }
34189

35-
LI { display: list-item }
190+
/* Table element rendering behavior cannot be described completely in CSS1,
191+
yet the following declarations appear to apply. This section is likely to become
192+
obsolete upon the deployment of a more comprehensive stylesheet specification
193+
for tables. */
36194

37-
H1, H2, H3, H4 { margin-top: 1em; margin-bottom: 1em }
38-
H5, H6 { margin-top: 1em }
39-
H1 { text-align: center }
40-
H1, H2, H4, H6 { font-weight: bold }
41-
H3, H5 { font-style: italic }
195+
CAPTION, COL, COLGROUP, LEGEND, TABLE, TBODY, TD, TFOOT, TH, THEAD, TR {
196+
background: transparent;
197+
text-decoration: none;
198+
margin: 1px;
199+
padding: 1px;
200+
border: none;
201+
float: none;
202+
clear: none;
203+
}
42204

43-
H1 { font-size: xx-large }
44-
H2 { font-size: x-large }
45-
H3 { font-size: large }
205+
TABLE, TBODY, TFOOT, THEAD, TR {
206+
display: block;
207+
background-position: top left;
208+
width: auto;
209+
height: auto;
210+
}
46211

47-
B, STRONG { font-weight: bolder } /* relative to the parent */
48-
I, CITE, EM, VAR, ADDRESS, BLOCKQUOTE { font-style: italic }
49-
PRE, TT, CODE, KBD, SAMP { font-family: monospace }
212+
CAPTION, LEGEND, TD, TH {
213+
display: inline;
214+
vertical-align: baseline;
215+
font-size: 1em;
216+
line-height: 1.33em;
217+
color: black;
218+
word-spacing: normal;
219+
letter-spacing: normal;
220+
text-transform: none;
221+
text-align: left;
222+
text-indent: 0;
223+
white-space: normal;
224+
}
50225

51-
PRE { white-space: pre }
226+
TH {
227+
font-weight: bolder;
228+
text-align: center;
229+
}
52230

53-
ADDRESS { margin-left: 3em }
54-
BLOCKQUOTE { margin-left: 3em; margin-right: 3em }
231+
CAPTION {
232+
text-align: center;
233+
}
55234

56-
UL, DIR { list-style: disc }
57-
OL { list-style: decimal }
58-
MENU { margin: 0 } /* tight formatting */
59-
LI { margin-left: 3em }
60235

61-
DT { margin-bottom: 0 }
62-
DD { margin-top: 0; margin-left: 3em }
236+
/* proposed default for HTML 4.0's new ACRONYM element */
63237

64-
HR { border-top: solid } /* 'border-bottom' could also have been used */
238+
ACRONYM {
239+
font-variant: small-caps;
240+
letter-spacing: 0.1em; /* This is almost facetious. Should ACRONYM not have
241+
any default rendering? Uppercase transform? Not all languages distinguish
242+
between simple abbreviations and acronyms, and not all abbrev. should be
243+
capped. */
244+
}
65245

66-
A:link { color: blue } /* unvisited link */
67-
A:visited { color: red } /* visited links */
68-
A:active { color: lime } /* active links */
246+
/* not part of the legacy browser default sheet, but an obvious enhancement */
69247

70-
/* setting the anchor border around IMG elements
71-
requires contextual selectors */
248+
OL OL LI {
249+
list-style-type: lower-alpha;
250+
}
251+
252+
OL OL OL LI {
253+
list-style-type: lower-roman
254+
}
72255

73-
A:link IMG { border: 2px solid blue }
74-
A:visited IMG { border: 2px solid red }
75-
A:active IMG { border: 2px solid lime }
76256
</PRE>
77257
</BODY>
78258
</HTML>

0 commit comments

Comments
 (0)