 {
  background-color: #4ecd9d;
}

.blue {
  background-color: #4e97cd;
}

.purple {
  background-color: #6c4ecd;
}

</style>
</head>
<body>

<h1>Collapsing Child Margins</h1>

<div class="red" style="border-top-style: solid;"><div class="orange" style="margin-top: 25px; border-top-style: solid; border-bottom-style: solid;"><p>Kid11</p><p>Kid12</p></div><div class="yellow">Kid2</div><div class="green"><p>Kid31</p><p><span>Kid32</span></p></div><div class="blue">Kid4</div><div class="purple"><div>Kid51</div>