0% found this document useful (0 votes)
7 views2 pages

Cool 2

The document is an HTML page that demonstrates the use of the CSS display property, specifically 'display: contents'. It includes a styled parent container and multiple child elements that are centered and have a green background. The structure showcases how the display property affects the layout of child elements within a parent element.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

Cool 2

The document is an HTML page that demonstrates the use of the CSS display property, specifically 'display: contents'. It includes a styled parent container and multiple child elements that are centered and have a green background. The structure showcases how the display property affects the layout of child elements within a parent element.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

<!

DOCTYPE html>
<html>

<head>
<style>
.wrapper {
display: contents;
}

.child {
text-align: center;
background-color: #4CAF50;
color: white;
padding: 10px;
margin: 5px;
}

.parent {
display: block;
background-color: #f0f0f0;
padding: 10px;
}
</style>
</head>

<body>
<h2>
CSS display property
</h2>
<h4>
display: contents
</h4>
<div class="parent">
<div class="wrapper">
<div class="child">
Child 1
</div>
<div class="child">
Child 2
</div>
<div class="child">
Child 3
</div>
</div>
</div>
</body>

</html>

You might also like