11<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'>
22<html lang="en">
3- <!-- $Id: selector.src,v 1.49 1998-01-22 01:16:32 ijacobs Exp $ -->
3+ <!-- $Id: selector.src,v 1.50 1998-01-24 00:18:12 ijacobs Exp $ -->
44<head>
55<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66<title>Selectors</title>
@@ -18,8 +18,9 @@ elements in the <a href="conform.html#doctree">document
1818tree</a>. These patterns, called <span class="index-def"
1919title="selectors"><em>selectors,</em></span> may range from simple
2020element names to rich contextual patterns. If all conditions in the
21- pattern are true for a certain element, the selector
22- <dfn>matches</dfn> the element.
21+ pattern are true for a certain element, the selector <span
22+ class="index-def"
23+ title="match|selector::match"><dfn>matches</dfn></span> the element.
2324
2425<P>The <span class="index-def" title="pattern
2526subject"><dfn>subject</dfn></span> of the pattern is the rightmost
@@ -112,7 +113,7 @@ document tree:
112113<p>At times, authors may want selectors to match an element that is
113114the descendant of another element in the document tree (e.g., "Match
114115those EM elements that are contained by an H1 element").
115- <span class="index-def" title="descendant-selectors">descendant
116+ <span class="index-def" title="descendant-selectors">Descendant
116117selectors</span> express such a relationship in a pattern.
117118A descendant selector matches when an element B is an arbitrary
118119descendant of some <a href="conform.html#doctree">ancestor</a> element
@@ -130,7 +131,7 @@ For example, consider the following rules:</p>
130131<p>Although the intention of these rules is to add emphasis to text by
131132changing its color, the effect will be lost in a case such as:</p>
132133
133- <pre>
134+ <pre class="html-example" >
134135 <H1>This headline is <EM>very</EM> important</H1>
135136</pre>
136137
@@ -144,9 +145,9 @@ within an H1:</p>
144145 H1 EM { color: blue }
145146</pre>
146147
147- <p>The third rule will also match the EM in the following fragment:</p>
148+ <p>The third rule will match the EM in the following fragment:</p>
148149
149- <pre>
150+ <pre class="html-example" >
150151 <H1>This
151152 <SPAN class="myclass">headline is <EM>very</EM>
152153 important</SPAN></H1>
@@ -195,12 +196,12 @@ are children of BODY:</p>
195196
196197<p>Child selectors may be <a href="#grouping">grouped</a>. A child
197198selector may also contain <a href="#attribute-selectors">attribute
198- selectors</a>. Descendant selectors and child selectors may be
199- combined.
199+ selectors</a>.
200200
201- <div class="example"><P>
201+ <P>Descendant selectors and child selectors may be combined.
202202For instance:
203203
204+ <div class="example"><P>
204205<pre>
205206DIV OL > LI P
206207</pre>
@@ -213,8 +214,8 @@ descendant of a DIV.
213214<h3><a name="first-child">:first-child</a> pseudo-class</h3>
214215
215216<P>The <span class="index-def" title="first-child">first-child</span>
216- <a href="#pseudo-classes">pseudo-class</a> allows authors to match
217- any element that is the first child of some other element.
217+ <a href="#pseudo-classes">pseudo-class</a> matches an element that is
218+ the first child of some other element.
218219
219220<div class="example"><P>
220221In the following example, the selector matches any P element
@@ -383,7 +384,7 @@ Here, the selector matches all SPAN elements whose
383384The following rules illustrate the differences between "=" and "~=":</p>
384385<pre>
385386 A[rel~="copyright"] {} /* matches, e.g., <A rel="copyright copyleft ..." */
386- td [colspan="2"] {} /* matches only <TD colspan="2"> ... */
387+ TD [colspan="2"] {} /* matches only <TD colspan="2"> ... */
387388</pre>
388389</div>
389390
@@ -498,6 +499,12 @@ an element instance based on its identifier.
498499be called something else. The name of the ID attribute is immaterial
499500for CSS.
500501
502+ <!-- Everyone has some complaints about the previous paragraph.
503+ Needs more explanation. For example,
504+ "Either say how one establishes
505+ which attribute is to play the ID role in creating items
506+ referenceable by #id syntax, or don't talk about it." -IJ -->
507+
501508<p>A CSS "id" selector contains a "#" immediately followed by the "id"
502509value.</p>
503510
@@ -824,7 +831,7 @@ considered within the :first-letter pseudo-element.
824831</em></p>
825832</div>
826833
827- <div class ="overlapping-example"><p>
834+ <div id ="overlapping-example" class=" example"><p>
828835The following example illustrates how overlapping pseudo-elements may
829836interact. The first letter of each P element will be green with a
830837font size of '24pt'. The rest of the first formatted line will be
0 commit comments