details-open-pseudo-001.html (463B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>test for details:open pseudoclass</title> 4 <link rel="match" href="details-open-pseudo-001-ref.html"> 5 <link rel="help" href="https://drafts.csswg.org/selectors-4/#open-state"> 6 7 <style> 8 details { 9 color: red; 10 } 11 :open { 12 color: green; 13 margin-left: 5em; 14 } 15 </style> 16 17 <p>The details element should be open, green, and indented:</p> 18 19 <details open=true> 20 <summary>Summary</summary> 21 <p>Detailed content</p> 22 </details>