|
1 | 1 | <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'> |
2 | 2 | <html lang="en"> |
3 | | -<!-- $Id: selector.src,v 2.22 1998-03-13 10:45:24 bbos Exp $ --> |
| 3 | +<!-- $Id: selector.src,v 2.23 1998-03-14 00:43:19 ijacobs Exp $ --> |
4 | 4 | <head> |
5 | 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
6 | 6 | <title>Selectors</title> |
@@ -37,7 +37,7 @@ selectors</a></TR> |
37 | 37 | <TR><TD>A > B<TD>Matches any B element that is a child of |
38 | 38 | an element A.<TD><a href="#child-selectors">Child selectors</a></TR> |
39 | 39 | <TR><TD>E:link<br>E:visited <TD>Matches element E if E is the source |
40 | | -acnhor of a hyperlink of which the target is not yet visited (:link) |
| 40 | +anchor of a hyperlink of which the target is not yet visited (:link) |
41 | 41 | or already visited (:visited) |
42 | 42 | <TD><a href="#link-pseudo-classes">The link pseudo-classes</a> |
43 | 43 | <TR><TD>E:active<br>E:hover<br>E:focus <TD>Matches E during certain |
@@ -423,6 +423,37 @@ to be read aloud in different voices for each role:</p> |
423 | 423 | </pre> |
424 | 424 | </div> |
425 | 425 |
|
| 426 | +<H3>Default attribute values in DTDs</H3> |
| 427 | + |
| 428 | +<P>Matching takes place on attribute values in the document tree. For |
| 429 | +document languages other than HTML, default attribute values may be |
| 430 | +defined in a <span class="index-inst" title="DTD">DTD</span>. Style |
| 431 | +sheets should be designed so that they work even if a DTD does not |
| 432 | +accompany a document. |
| 433 | + |
| 434 | +<!-- Fix this example from Martin |
| 435 | +<P>For an element EXAMPLE with a DTD fragment of |
| 436 | + |
| 437 | +<!ATTLIST ex_attribute ... default-value [Bert, please complete here] |
| 438 | + |
| 439 | +if the style sheet contains a rule |
| 440 | + |
| 441 | +EXAMPLE[ex_attribute=default-value] { ... property settings ... } |
| 442 | +EXAMPLE[ex_attribute=other-value] { .......} |
| 443 | + |
| 444 | +then to catch the cases where this attribute is set by default, |
| 445 | +and not explicitly, the following rule might be added: |
| 446 | + |
| 447 | +EXAMPLE { ... the same property settings ... } |
| 448 | + |
| 449 | +Because this selector is less specific that a selector with |
| 450 | +another specific attribute value, it will only be used for |
| 451 | +the default case. Care has to be taken that all other attribute |
| 452 | +values that don't get the same style as the default value are |
| 453 | +explicitly covered. |
| 454 | + |
| 455 | +-IJ --> |
| 456 | + |
426 | 457 |
|
427 | 458 | <h3><a name="class-html">The "class" attribute in HTML</a></h3> |
428 | 459 |
|
@@ -735,7 +766,6 @@ declarations are equivalent:</p> |
735 | 766 | A:link { color: red } |
736 | 767 | :link { color: red } |
737 | 768 | </pre> |
738 | | -</div> |
739 | 769 |
|
740 | 770 | <!-- What about LINK? Why only A elements (WG still out on |
741 | 771 | this)? What about XML? -IJ --> |
|
0 commit comments