Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/grouping-content/the-li-element/grouping-li-reftest-display-list-item.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>display: list-item on non-<li> elements</title>
<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me">
<link rel="match" href="grouping-li-reftest-display-list-item-ref.html">
<style>
.list-item {
display: list-item;
list-style-type: decimal;
}
.list-item[hidden] {
display: none;
}
</style>
<p>This test matches if both lists display similar to the following:</p>
<pre>1. A
2. B
D
3. E</pre>
<hr>
<ul>
<span class="list-item">A</span>
<span class="list-item">B</span>
<span class="list-item" hidden>C</span>
<span>D</span>
<span class="list-item">E</span>
</ul>
<ol>
<div class="list-item">A</div>
<div class="list-item">B</div>
<div class="list-item" hidden>C</div>
<div>D</div>
<div class="list-item">E</div>
</ol>