object.style.display = "value"; <'display'> = [ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy> <display-outside> = block | inline | run-in block Generates a box that is block-level when placed in flow layout.
inline Generates a box that is inline-level when placed in flow layout.
run-in Generates an run-in box, which is a type of inline-level box with special behavior that attempts to merge it into a subsequent block container.
<display-inside> = flow | flow-root | table | flex | grid | ruby flow Lays out its contents using flow layout.
flow-root Generates a block container box and lays out its contents using flow layout.
table Generates a principal table wrapper box that establishes a block formatting context and which contains an additionally-generated table grid box that establishes a table formatting context.
flex Generates a principal flex container box and establishes a flex formatting context.
grid Generates a principal grid container box and establishes a grid formatting context.
ruby Generates a ruby container box and establishes a ruby formatting context in addition to integrating its base-level contents into its parent formatting context if it is inline or generating a wrapper box of the appropriate outer display type if it is not inline.
<display-listitem> = <display-outside>? && [ flow | flow-root ]? && list-item <display-outside> = block | inline | run-in block Generates a box that is block-level when placed in flow layout.
inline Generates a box that is inline-level when placed in flow layout.
run-in Generates an run-in box, which is a type of inline-level box with special behavior that attempts to merge it into a subsequent block container.
flow Lays out its contents using flow layout.
flow-root Generates a block container box and lays out its contents using flow layout.
list-item Generates a ::marker pseudo-element with the content specified by its list-style properties together with a principal box of the specified type for its own contents.
<display-internal> = table-row-group | table-header-group | table-footer-group | table-row | table-cell | table-column-group | table-column | table-caption | ruby-base | ruby-text | ruby-base-container | ruby-text-container table-row-group Behaves as a tbody element.
table-header-group Behaves as a thead element.
table-footer-group Behaves as a tfoot element.
table-row Behaves as a tr element.
table-cell Behaves as a td element.
table-column-group Behaves as a colgroup element.
table-column Behaves as a col element.
table-caption Behaves as a caption element.
ruby-base Behaves as a rb element.
ruby-text Behaves as a rt element.
ruby-base-container Behaves as a rbc element.
ruby-text-container Behaves as a rtc element.
<display-box> = contents | none contents Does not generate any boxes itself, but its children and pseudo-elements still generate boxes and text runs as normal.
none Does not generate boxes or text runs.
<display-legacy> = inline-block | inline-table | inline-flex | inline-grid inline-block Behaves as inline flow-root.
inline-table Behaves as inline table.
inline-flex Behaves as inline flex.
inline-grid Behaves as inline grid.
<!doctype html>
<html>
<head>
<style>
div
{
background-color: lightgray;
}
p
{
background-color: yellow;
display: none;
}
</style>
</head>
<body>
<div>
<p>none</p>
<p>none</p>
<p>none</p>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
div
{
background-color: lightgray;
}
p
{
background-color: yellow;
display: contents;
}
</style>
</head>
<body>
<button>initial</button>
<button>contents</button>
<button>none</button>
<div>
<p>display-box</p>
<p>display-box</p>
<p>display-box</p>
</div>
<script>
function myfunction(myparameter)
{
for(const myp of document.querySelectorAll("p"))
{
myp.style.display = myparameter.target.innerHTML;
}
}
for(const mybutton of document.querySelectorAll("button"))
{
mybutton.addEventListener("mouseover", myfunction);
}
</script>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
div
{
background-color: lightgray;
}
p
{
background-color: yellow;
display: flex;
}
</style>
</head>
<body>
<div>
<p>flex</p>
<p>flex</p>
<p>flex</p>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
div
{
background-color: lightgray;
}
p
{
background-color: yellow;
display: flow;
}
</style>
</head>
<body>
<div>
<p>flow</p>
<p>flow</p>
<p>flow</p>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
div
{
background-color: lightgray;
}
p
{
background-color: yellow;
display: flow-root;
}
</style>
</head>
<body>
<div>
<p>flow-root</p>
<p>flow-root</p>
<p>flow-root</p>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
div
{
background-color: lightgray;
}
p
{
background-color: yellow;
display: grid;
}
</style>
</head>
<body>
<div>
<p>grid</p>
<p>grid</p>
<p>grid</p>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
.ruby
{
background-color: yellow;
display: ruby;
}
.rubyBase
{
display: ruby-base;
}
.rubyBaseContainer
{
display: ruby-base-container;
}
.rubyText
{
display: ruby-text;
}
.rubyTextContainer
{
display: ruby-text-container;
}
</style>
</head>
<body>
<div class="ruby">
<div class="rubyBaseContainer">
<div class="rubyBase">base</div>
<div class="rubyBase">base</div>
<div class="rubyBase">base</div>
</div>
<div class="rubyTextContainer">
<div class="rubyText">text</div>
<div class="rubyText">text</div>
<div class="rubyText">text</div>
</div>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
.table
{
background-color: yellow;
display: table;
}
.tableCaption
{
display: table-caption;
}
.tableCell
{
display: table-cell;
}
.tableColumn
{
display: table-column;
}
.tableColumnGroup
{
display: table-column-group;
}
.tableFooterGroup
{
display: table-footer-group;
}
.tableHeaderGroup
{
display: table-header-group;
}
.tableRow
{
display: table-row;
}
.tableRowGroup
{
display: table-row-group;
}
</style>
</head>
<body>
<div class="table">
<div class="tableCaption">caption</div>
<div class="tableColumnGroup">
<div class="tableColumn"></div>
<div class="tableColumn"></div>
</div>
<div class="tableColumn"></div>
<div class="tableHeaderGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableRowGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableFooterGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
div
{
background-color: lightgray;
}
p
{
background-color: yellow;
}
</style>
</head>
<body>
<button>initial</button>
<button>flex</button>
<button>flow</button>
<button>flow-root</button>
<button>grid</button>
<div>
<p>display-inside</p>
<p>display-inside</p>
<p>display-inside</p>
</div>
<script>
function myfunction(myparameter)
{
for(const myp of document.querySelectorAll("p"))
{
myp.style.display = myparameter.target.innerHTML;
}
}
for(const mybutton of document.querySelectorAll("button"))
{
mybutton.addEventListener("mouseover", myfunction);
}
</script>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
.ruby
{
display: ruby;
}
.rubyBase
{
background-color: yellow;
display: ruby-base;
}
.rubyBaseContainer
{
display: ruby-base-container;
}
.rubyText
{
display: ruby-text;
}
.rubyTextContainer
{
display: ruby-text-container;
}
</style>
</head>
<body>
<div class="ruby">
<div class="rubyBaseContainer">
<div class="rubyBase">base</div>
<div class="rubyBase">base</div>
<div class="rubyBase">base</div>
</div>
<div class="rubyTextContainer">
<div class="rubyText">text</div>
<div class="rubyText">text</div>
<div class="rubyText">text</div>
</div>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
.ruby
{
display: ruby;
}
.rubyBase
{
display: ruby-base;
}
.rubyBaseContainer
{
background-color: yellow;
display: ruby-base-container;
}
.rubyText
{
display: ruby-text;
}
.rubyTextContainer
{
display: ruby-text-container;
}
</style>
</head>
<body>
<div class="ruby">
<div class="rubyBaseContainer">
<div class="rubyBase">base</div>
<div class="rubyBase">base</div>
<div class="rubyBase">base</div>
</div>
<div class="rubyTextContainer">
<div class="rubyText">text</div>
<div class="rubyText">text</div>
<div class="rubyText">text</div>
</div>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
.ruby
{
display: ruby;
}
.rubyBase
{
display: ruby-base;
}
.rubyBaseContainer
{
display: ruby-base-container;
}
.rubyText
{
background-color: yellow;
display: ruby-text;
}
.rubyTextContainer
{
display: ruby-text-container;
}
</style>
</head>
<body>
<div class="ruby">
<div class="rubyBaseContainer">
<div class="rubyBase">base</div>
<div class="rubyBase">base</div>
<div class="rubyBase">base</div>
</div>
<div class="rubyTextContainer">
<div class="rubyText">text</div>
<div class="rubyText">text</div>
<div class="rubyText">text</div>
</div>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
.ruby
{
display: ruby;
}
.rubyBase
{
display: ruby-base;
}
.rubyBaseContainer
{
display: ruby-base-container;
}
.rubyText
{
display: ruby-text;
}
.rubyTextContainer
{
background-color: yellow;
display: ruby-text-container;
}
</style>
</head>
<body>
<div class="ruby">
<div class="rubyBaseContainer">
<div class="rubyBase">base</div>
<div class="rubyBase">base</div>
<div class="rubyBase">base</div>
</div>
<div class="rubyTextContainer">
<div class="rubyText">text</div>
<div class="rubyText">text</div>
<div class="rubyText">text</div>
</div>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
.table
{
display: table;
}
.tableCaption
{
background-color: yellow;
display: table-caption;
}
.tableCell
{
display: table-cell;
}
.tableColumn
{
display: table-column;
}
.tableColumnGroup
{
display: table-column-group;
}
.tableFooterGroup
{
display: table-footer-group;
}
.tableHeaderGroup
{
display: table-header-group;
}
.tableRow
{
display: table-row;
}
.tableRowGroup
{
display: table-row-group;
}
</style>
</head>
<body>
<div class="table">
<div class="tableCaption">caption</div>
<div class="tableColumnGroup">
<div class="tableColumn"></div>
<div class="tableColumn"></div>
</div>
<div class="tableColumn"></div>
<div class="tableHeaderGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableRowGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableFooterGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
.table
{
display: table;
}
.tableCaption
{
display: table-caption;
}
.tableCell
{
background-color: yellow;
display: table-cell;
}
.tableColumn
{
display: table-column;
}
.tableColumnGroup
{
display: table-column-group;
}
.tableFooterGroup
{
display: table-footer-group;
}
.tableHeaderGroup
{
display: table-header-group;
}
.tableRow
{
display: table-row;
}
.tableRowGroup
{
display: table-row-group;
}
</style>
</head>
<body>
<div class="table">
<div class="tableCaption">caption</div>
<div class="tableColumnGroup">
<div class="tableColumn"></div>
<div class="tableColumn"></div>
</div>
<div class="tableColumn"></div>
<div class="tableHeaderGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableRowGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableFooterGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
.table
{
display: table;
}
.tableCaption
{
display: table-caption;
}
.tableCell
{
display: table-cell;
}
.tableColumn
{
background-color: yellow;
display: table-column;
}
.tableColumnGroup
{
display: table-column-group;
}
.tableFooterGroup
{
display: table-footer-group;
}
.tableHeaderGroup
{
display: table-header-group;
}
.tableRow
{
display: table-row;
}
.tableRowGroup
{
display: table-row-group;
}
</style>
</head>
<body>
<div class="table">
<div class="tableCaption">caption</div>
<div class="tableColumnGroup">
<div class="tableColumn"></div>
<div class="tableColumn"></div>
</div>
<div class="tableColumn"></div>
<div class="tableHeaderGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableRowGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableFooterGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
.table
{
display: table;
}
.tableCaption
{
display: table-caption;
}
.tableCell
{
display: table-cell;
}
.tableColumn
{
display: table-column;
}
.tableColumnGroup
{
background-color: yellow;
display: table-column-group;
}
.tableFooterGroup
{
display: table-footer-group;
}
.tableHeaderGroup
{
display: table-header-group;
}
.tableRow
{
display: table-row;
}
.tableRowGroup
{
display: table-row-group;
}
</style>
</head>
<body>
<div class="table">
<div class="tableCaption">caption</div>
<div class="tableColumnGroup">
<div class="tableColumn"></div>
<div class="tableColumn"></div>
</div>
<div class="tableColumn"></div>
<div class="tableHeaderGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableRowGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableFooterGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
.table
{
display: table;
}
.tableCaption
{
display: table-caption;
}
.tableCell
{
display: table-cell;
}
.tableColumn
{
display: table-column;
}
.tableColumnGroup
{
display: table-column-group;
}
.tableFooterGroup
{
background-color: yellow;
display: table-footer-group;
}
.tableHeaderGroup
{
display: table-header-group;
}
.tableRow
{
display: table-row;
}
.tableRowGroup
{
display: table-row-group;
}
</style>
</head>
<body>
<div class="table">
<div class="tableCaption">caption</div>
<div class="tableColumnGroup">
<div class="tableColumn"></div>
<div class="tableColumn"></div>
</div>
<div class="tableColumn"></div>
<div class="tableHeaderGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableRowGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableFooterGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
.table
{
display: table;
}
.tableCaption
{
display: table-caption;
}
.tableCell
{
display: table-cell;
}
.tableColumn
{
display: table-column;
}
.tableColumnGroup
{
display: table-column-group;
}
.tableFooterGroup
{
display: table-footer-group;
}
.tableHeaderGroup
{
background-color: yellow;
display: table-header-group;
}
.tableRow
{
display: table-row;
}
.tableRowGroup
{
display: table-row-group;
}
</style>
</head>
<body>
<div class="table">
<div class="tableCaption">caption</div>
<div class="tableColumnGroup">
<div class="tableColumn"></div>
<div class="tableColumn"></div>
</div>
<div class="tableColumn"></div>
<div class="tableHeaderGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableRowGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableFooterGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
.table
{
display: table;
}
.tableCaption
{
display: table-caption;
}
.tableCell
{
display: table-cell;
}
.tableColumn
{
display: table-column;
}
.tableColumnGroup
{
display: table-column-group;
}
.tableFooterGroup
{
display: table-footer-group;
}
.tableHeaderGroup
{
display: table-header-group;
}
.tableRow
{
background-color: yellow;
display: table-row;
}
.tableRowGroup
{
display: table-row-group;
}
</style>
</head>
<body>
<div class="table">
<div class="tableCaption">caption</div>
<div class="tableColumnGroup">
<div class="tableColumn"></div>
<div class="tableColumn"></div>
</div>
<div class="tableColumn"></div>
<div class="tableHeaderGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableRowGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableFooterGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
.table
{
display: table;
}
.tableCaption
{
display: table-caption;
}
.tableCell
{
display: table-cell;
}
.tableColumn
{
display: table-column;
}
.tableColumnGroup
{
display: table-column-group;
}
.tableFooterGroup
{
display: table-footer-group;
}
.tableHeaderGroup
{
display: table-header-group;
}
.tableRow
{
display: table-row;
}
.tableRowGroup
{
background-color: yellow;
display: table-row-group;
}
</style>
</head>
<body>
<div class="table">
<div class="tableCaption">caption</div>
<div class="tableColumnGroup">
<div class="tableColumn"></div>
<div class="tableColumn"></div>
</div>
<div class="tableColumn"></div>
<div class="tableHeaderGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableRowGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableFooterGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
.ruby
{
display: ruby;
}
.rubyBase
{
display: ruby-base;
}
.rubyBaseContainer
{
display: ruby-base-container;
}
.rubyText
{
display: ruby-text;
}
.rubyTextContainer
{
display: ruby-text-container;
}
</style>
</head>
<body>
<button>initial</button>
<button>ruby</button>
<button value="rubyBase">ruby-base</button>
<button value="rubyBaseContainer">ruby-base-container</button>
<button value="rubyText">ruby-text</button>
<button value="rubyTextContainer">ruby-text-container</button><br>
<div class="ruby">
<div class="rubyBaseContainer">
<div class="rubyBase">base</div>
<div class="rubyBase">base</div>
<div class="rubyBase">base</div>
</div>
<div class="rubyTextContainer">
<div class="rubyText">text</div>
<div class="rubyText">text</div>
<div class="rubyText">text</div>
</div>
</div>
<script>
function myfunction(myparameter)
{
const mytarget = myparameter.target;
const myproperty = mytarget.value || mytarget.innerHTML;
for(const mydiv of document.querySelectorAll("div"))
{
mydiv.style.backgroundColor = "transparent";
if(mydiv.getAttribute("class") == myproperty)
{
mydiv.style.backgroundColor = "yellow";
}
}
}
for(const mybutton of document.querySelectorAll("button"))
{
mybutton.addEventListener("mouseover", myfunction);
}
</script>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
.table
{
display: table;
}
.tableCaption
{
display: table-caption;
}
.tableCell
{
display: table-cell;
}
.tableColumn
{
display: table-column;
}
.tableColumnGroup
{
display: table-column-group;
}
.tableFooterGroup
{
display: table-footer-group;
}
.tableHeaderGroup
{
display: table-header-group;
}
.tableRow
{
display: table-row;
}
.tableRowGroup
{
display: table-row-group;
}
</style>
</head>
<body>
<button>initial</button>
<button>table</button>
<button value="tableCaption">table-caption</button>
<button value="tableCell">table-cell</button>
<button value="tableColumn">table-column</button>
<button value="tableColumnGroup">table-column-group</button>
<button value="tableFooterGroup">table-footer-group</button>
<button value="tableHeaderGroup">table-header-group</button>
<button value="tableRow">table-row</button>
<button value="tableRowGroup">table-row-group</button>
<div class="table">
<div class="tableCaption">caption</div>
<div class="tableColumnGroup">
<div class="tableColumn"></div>
<div class="tableColumn"></div>
</div>
<div class="tableColumn"></div>
<div class="tableHeaderGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableRowGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableFooterGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
</div>
<script>
function myfunction(myparameter)
{
const mytarget = myparameter.target;
const myproperty = mytarget.value || mytarget.innerHTML;
for(const mydiv of document.querySelectorAll("div"))
{
mydiv.style.backgroundColor = "transparent";
if(mydiv.getAttribute("class") == myproperty)
{
mydiv.style.backgroundColor = "yellow";
}
}
}
for(const mybutton of document.querySelectorAll("button"))
{
mybutton.addEventListener("mouseover", myfunction);
}
</script>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
div
{
background-color: lightgray;
}
p
{
background-color: yellow;
display: inline-block;
}
</style>
</head>
<body>
<div>
<p>inline-block</p>
<p>inline-block</p>
<p>inline-block</p>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
div
{
background-color: lightgray;
}
p
{
background-color: yellow;
display: inline-flex;
}
</style>
</head>
<body>
<div>
<p>inline-flex</p>
<p>inline-flex</p>
<p>inline-flex</p>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
div
{
background-color: lightgray;
}
p
{
background-color: yellow;
display: inline-grid;
}
</style>
</head>
<body>
<div>
<p>inline-grid</p>
<p>inline-grid</p>
<p>inline-grid</p>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
.inlineTable
{
background-color: yellow;
display: inline-table;
}
.tableCaption
{
display: table-caption;
}
.tableCell
{
display: table-cell;
}
.tableColumn
{
display: table-column;
}
.tableColumnGroup
{
display: table-column-group;
}
.tableFooterGroup
{
display: table-footer-group;
}
.tableHeaderGroup
{
display: table-header-group;
}
.tableRow
{
display: table-row;
}
.tableRowGroup
{
display: table-row-group;
}
</style>
</head>
<body>
<div class="inlineTable">
<div class="tableCaption">caption</div>
<div class="tableColumnGroup">
<div class="tableColumn"></div>
<div class="tableColumn"></div>
</div>
<div class="tableColumn"></div>
<div class="tableHeaderGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableRowGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
<div class="tableFooterGroup">
<div class="tableRow">
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
<div class="tableCell">cell</div>
</div>
</div>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
div
{
background-color: lightgray;
}
p
{
background-color: yellow;
}
</style>
</head>
<body>
<button>initial</button>
<button>inline-block</button>
<button>inline-flex</button>
<button>inline-grid</button>
<div>
<p>display-legacy</p>
<p>display-legacy</p>
<p>display-legacy</p>
</div>
<script>
function myfunction(myparameter)
{
for(const myp of document.querySelectorAll("p"))
{
myp.style.display = myparameter.target.innerHTML;
}
}
for(const mybutton of document.querySelectorAll("button"))
{
mybutton.addEventListener("mouseover", myfunction);
}
</script>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
li
{
background-color: yellow;
display: list-item;
}
</style>
</head>
<body>
<ul>
<li>list-item</li>
<li>list-item</li>
<li>list-item</li>
</ul>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
li
{
background-color: yellow;
}
</style>
</head>
<body>
<button>initial</button>
<button>list-item</button>
<ul>
<li>display-listitem</li>
<li>display-listitem</li>
<li>display-listitem</li>
</ul>
<script>
function myfunction(myparameter)
{
for(const myli of document.querySelectorAll("li"))
{
myli.style.display = myparameter.target.innerHTML;
}
}
for(const mybutton of document.querySelectorAll("button"))
{
mybutton.addEventListener("mouseover", myfunction);
}
</script>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
div
{
background-color: lightgray;
}
p
{
background-color: yellow;
display: block;
}
</style>
</head>
<body>
<div>
<p>block</p>
<p>block</p>
<p>block</p>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
div
{
background-color: lightgray;
}
p
{
background-color: yellow;
display: inline;
}
</style>
</head>
<body>
<div>
<p>inline</p>
<p>inline</p>
<p>inline</p>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
div
{
background-color: lightgray;
}
p
{
background-color: yellow;
display: run-in;
}
</style>
</head>
<body>
<div>
<p>run-in</p>
<p>run-in</p>
<p>run-in</p>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
div
{
background-color: lightgray;
}
p
{
background-color: yellow;
}
</style>
</head>
<body>
<button>initial</button>
<button>block</button>
<button>inline</button>
<button>run-in</button>
<div>
<p>display-outside</p>
<p>display-outside</p>
<p>display-outside</p>
</div>
<script>
function myfunction(myparameter)
{
for(const myp of document.querySelectorAll("p"))
{
myp.style.display = myparameter.target.innerHTML;
}
}
for(const mybutton of document.querySelectorAll("button"))
{
mybutton.addEventListener("mouseover", myfunction);
}
</script>
</body>
</html>