Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>legend display: none</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<style>
legend { display: none; }
</style>
<fieldset>
<legend>Foo</legend>
</fieldset>
<script>
test(() => {
const display = getComputedStyle(document.querySelector('legend')).display;
assert_equals(display, 'none');
});
</script>