<div>Outside the parent</div>
<div class="parent">
  <p class="child">
    Here is a paragraph housed in the parent element
  </p>
</div>
body {
  background-color: #f2f2f2;
  padding: 30px;
}

div {
  background: #3d8bb1 /* blue */;
}

.parent {
  margin-top: 30px;
  background: #49b293 /* green */;
  height: 150px;
}
.child {
  margin-top: 10px;
  background: #b03532 /* red */;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.