Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/selectors/selectors-4/details-open-pseudo-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>test for details:open pseudoclass</title>
<link rel="match" href="details-open-pseudo-001-ref.html">
<style>
details {
color: red;
}
:open {
color: green;
margin-left: 5em;
}
</style>
<p>The details element should be open, green, and indented:</p>
<details open=true>
<summary>Summary</summary>
<p>Detailed content</p>
</details>