OLD | NEW |
(Empty) | |
| 1 <?xml version="1.0" encoding="UTF-8"?> |
| 2 <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:html="h
ttp://www.w3.org/1999/xhtml"> |
| 3 <head> |
| 4 <title>Selectors Level 4: :first-of-type</title> |
| 5 <meta name="flags" content="namespace nonHTML"/> |
| 6 <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/
contact"/> |
| 7 <link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/> |
| 8 <link rel="help" href="https://drafts.csswg.org/selectors-4/#the-first-of-type-p
seudo"/> |
| 9 <link rel="match" href="of-type-selectors-ref.xhtml"/> |
| 10 <style type="text/css"> |
| 11 div > *|* { |
| 12 display: block; |
| 13 color: black; |
| 14 background: yellow; |
| 15 border: thin solid; |
| 16 margin: 1em; |
| 17 } |
| 18 div > *|*:first-of-type { |
| 19 background: lime; |
| 20 } |
| 21 </style> |
| 22 </head> |
| 23 <body> |
| 24 <div> |
| 25 <p>This line should have a green background.</p> |
| 26 <p>This line should have a yellow background.</p> |
| 27 <html:p>This line should have a yellow background.</html:p> |
| 28 <p xmlns="http://www.example.com/ns">This line should have a green background.</
p> |
| 29 <p xmlns="">This line should have a green background.</p> |
| 30 </div> |
| 31 </body> |
| 32 </html> |
OLD | NEW |